Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing cucumber as node module :Mac #768

Closed
mukteshkrmishra opened this issue Feb 20, 2017 · 4 comments
Closed

Error installing cucumber as node module :Mac #768

mukteshkrmishra opened this issue Feb 20, 2017 · 4 comments

Comments

@mukteshkrmishra
Copy link

Hi,

I am trying to install cucumber as node module in my local mac. However getting errors while installing.

Can anybody please help.

Pasting out from npm-debug.log.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'cucumber' ]
2 info using [email protected]
3 info using [email protected]
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData cucumber
8 silly fetchNamedPackageData cucumber
9 silly mapToRegistry name cucumber
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry data Result {
12 silly mapToRegistry raw: 'cucumber',
12 silly mapToRegistry scope: null,
12 silly mapToRegistry name: 'cucumber',
12 silly mapToRegistry rawSpec: '',
12 silly mapToRegistry spec: 'latest',
12 silly mapToRegistry type: 'tag' }
13 silly mapToRegistry uri https://registry.npmjs.org/cucumber
14 verbose request uri https://registry.npmjs.org/cucumber
15 verbose request no auth needed
16 info attempt registry request try #1 at 7:22:42 PM
17 verbose request id 5cb5b8eb273fc49e
18 verbose etag W/"58a21588-4e160"
19 verbose lastModified Mon, 13 Feb 2017 20:22:32 GMT
20 http request GET https://registry.npmjs.org/cucumber
21 http 304 https://registry.npmjs.org/cucumber
22 verbose headers { date: 'Mon, 20 Feb 2017 03:22:43 GMT',
22 verbose headers via: '1.1 varnish',
22 verbose headers 'cache-control': 'max-age=300',
22 verbose headers etag: 'W/"58a21588-4e160"',
22 verbose headers age: '120',
22 verbose headers connection: 'close',
22 verbose headers 'x-served-by': 'cache-iad2126-IAD',
22 verbose headers 'x-cache': 'HIT',
22 verbose headers 'x-cache-hits': '1',
22 verbose headers 'x-timer': 'S1487560963.550004,VS0,VE0',
22 verbose headers vary: 'Accept-Encoding' }
23 silly get cb [ 304,
23 silly get { date: 'Mon, 20 Feb 2017 03:22:43 GMT',
23 silly get via: '1.1 varnish',
23 silly get 'cache-control': 'max-age=300',
23 silly get etag: 'W/"58a21588-4e160"',
23 silly get age: '120',
23 silly get connection: 'close',
23 silly get 'x-served-by': 'cache-iad2126-IAD',
23 silly get 'x-cache': 'HIT',
23 silly get 'x-cache-hits': '1',
23 silly get 'x-timer': 'S1487560963.550004,VS0,VE0',
23 silly get vary: 'Accept-Encoding' } ]
24 verbose etag https://registry.npmjs.org/cucumber from cache
25 verbose get saving cucumber to /Users/XXX/.npm/registry.npmjs.org/cucumber/.cache.json
26 verbose correctMkdir /Users/XXX/.npm correctMkdir not in flight; initializing
27 silly install normalizeTree
28 silly loadCurrentTree Finishing
29 silly loadIdealTree Starting
30 silly install loadIdealTree
31 silly cloneCurrentTree Starting
32 silly install cloneCurrentTreeToIdealTree
33 silly cloneCurrentTree Finishing
34 silly loadShrinkwrap Starting
35 silly install loadShrinkwrap
36 silly loadShrinkwrap Finishing
37 silly loadAllDepsIntoIdealTree Starting
38 silly install loadAllDepsIntoIdealTree
39 silly rollbackFailedOptional Starting
40 silly rollbackFailedOptional Finishing
41 silly runTopLevelLifecycles Starting
42 silly runTopLevelLifecycles Finishing
43 silly install printInstalled
44 verbose stack Error: Refusing to install cucumber as a dependency of itself
44 verbose stack at checkSelf (/usr/local/lib/node_modules/npm/lib/install/validate-args.js:53:14)
44 verbose stack at Array. (/usr/local/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
44 verbose stack at LOOP (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
44 verbose stack at chain (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
44 verbose stack at /usr/local/lib/node_modules/npm/lib/install/validate-args.js:16:5
44 verbose stack at /usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:35
44 verbose stack at Array.forEach (native)
44 verbose stack at /usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:11
44 verbose stack at Array.forEach (native)
44 verbose stack at asyncMap (/usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:51:8)
45 verbose cwd /Users/XXX/git/cucumber-js
46 error Darwin 15.6.0
47 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "cucumber"
48 error node v5.5.0
49 error npm v3.8.9
50 error code ENOSELF
51 error Refusing to install cucumber as a dependency of itself
52 error If you need help, you may report this error at:
52 error https://github.com/npm/npm/issues
53 verbose exit [ 1, true ]

@mukteshkrmishra mukteshkrmishra changed the title Error installing cucumber as node module Error installing cucumber as node module :Mac Feb 20, 2017
@charlierudolph
Copy link
Member

What is in the package.json file of the folder you are trying to install cucumber in? I'm on npm v4.0.5 and if I try to install cucumber when the name in the package.json is cucumber I get a similar error.

code ENOSELF
Refusing to install package with name "cucumber" under a package
also called "cucumber". Did you name your project the same
as the dependency you're installing?

@mukteshkrmishra
Copy link
Author

I am on 3.8.9 of npm. Cloned master branch so whatever is there in package.json I am trying to install the same.

@mukteshkrmishra
Copy link
Author

Here is the deal. I upgraded my Node and NPM, so I no longer receive the above error. however I started receiving a new error stating that module installation with same name (cucumber) cannnot be proceeded. Thus, I changed the project name in package.json as "cucumber1" and bam !! it got installed.

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants