formly-js / angular-formly

JavaScript powered forms for AngularJS
http://docs.angular-formly.com
MIT License
2.22k stars 405 forks source link

Refusing to install angular-formly as a dependency of itself #600

Closed dmitriz closed 8 years ago

dmitriz commented 8 years ago

This is what I get trying to npm install angular-formly in empty directory:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/Users/dmitrizaitsev/npm-global/bin/npm',
1 verbose cli   'install',
1 verbose cli   'angular-formly',
1 verbose cli   '-d',
1 verbose cli   '-S' ]
2 info using npm@3.5.2
3 info using node@v4.2.3
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData angular-formly
8 silly fetchNamedPackageData angular-formly
9 silly mapToRegistry name angular-formly
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry uri https://registry.npmjs.org/angular-formly
13 verbose request uri https://registry.npmjs.org/angular-formly
14 verbose request no auth needed
15 info attempt registry request try #1 at 2:48:30 PM
16 verbose request using bearer token for auth
17 verbose request id 222f2f68169cb7a3
18 verbose etag "5MSCGKPTFMQYPDKREHVWW7IKR"
19 http request GET https://registry.npmjs.org/angular-formly
20 http 304 https://registry.npmjs.org/angular-formly
21 verbose headers { 'cache-control': 'max-age=300',
21 verbose headers   'accept-ranges': 'bytes',
21 verbose headers   date: 'Sat, 09 Jan 2016 14:48:31 GMT',
21 verbose headers   via: '1.1 varnish',
21 verbose headers   connection: 'keep-alive',
21 verbose headers   'x-served-by': 'cache-sin6924-SIN',
21 verbose headers   'x-cache': 'MISS',
21 verbose headers   'x-cache-hits': '0',
21 verbose headers   'x-timer': 'S1452350911.286033,VS0,VE282' }
22 silly get cb [ 304,
22 silly get   { 'cache-control': 'max-age=300',
22 silly get     'accept-ranges': 'bytes',
22 silly get     date: 'Sat, 09 Jan 2016 14:48:31 GMT',
22 silly get     via: '1.1 varnish',
22 silly get     connection: 'keep-alive',
22 silly get     'x-served-by': 'cache-sin6924-SIN',
22 silly get     'x-cache': 'MISS',
22 silly get     'x-cache-hits': '0',
22 silly get     'x-timer': 'S1452350911.286033,VS0,VE282' } ]
23 verbose etag https://registry.npmjs.org/angular-formly from cache
24 verbose get saving angular-formly to /Users/dmitrizaitsev/.npm/registry.npmjs.org/angular-formly/.cache.json
25 silly install normalizeTree
26 silly loadCurrentTree Finishing
27 silly loadIdealTree Starting
28 silly install loadIdealTree
29 silly cloneCurrentTree Starting
30 silly install cloneCurrentTreeToIdealTree
31 silly cloneCurrentTree Finishing
32 silly loadShrinkwrap Starting
33 silly install loadShrinkwrap
34 silly loadShrinkwrap Finishing
35 silly loadAllDepsIntoIdealTree Starting
36 silly install loadAllDepsIntoIdealTree
37 silly rollbackFailedOptional Starting
38 silly rollbackFailedOptional Finishing
39 silly runTopLevelLifecycles Starting
40 silly runTopLevelLifecycles Finishing
41 silly install printInstalled
42 verbose stack Error: Refusing to install angular-formly as a dependency of itself
42 verbose stack     at checkSelf (/Users/dmitrizaitsev/npm-global/lib/node_modules/npm/lib/install/validate-args.js:40:14)
42 verbose stack     at Array.<anonymous> (/Users/dmitrizaitsev/npm-global/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
42 verbose stack     at LOOP (/Users/dmitrizaitsev/npm-global/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
42 verbose stack     at chain (/Users/dmitrizaitsev/npm-global/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
42 verbose stack     at /Users/dmitrizaitsev/npm-global/lib/node_modules/npm/lib/install/validate-args.js:15:5
42 verbose stack     at /Users/dmitrizaitsev/npm-global/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:35
42 verbose stack     at Array.forEach (native)
42 verbose stack     at /Users/dmitrizaitsev/npm-global/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:11
42 verbose stack     at Array.forEach (native)
42 verbose stack     at asyncMap (/Users/dmitrizaitsev/npm-global/lib/node_modules/npm/node_modules/slide/lib/async-map.js:51:8)
43 verbose cwd /Users/dmitrizaitsev/Dropbox/Sandbox/angular-formly
44 error Darwin 12.6.0
45 error argv "/usr/local/bin/node" "/Users/dmitrizaitsev/npm-global/bin/npm" "install" "angular-formly" "-d" "-S"
46 error node v4.2.3
47 error npm  v3.5.2
48 error code ENOSELF
49 error Refusing to install angular-formly as a dependency of itself
50 error If you need help, you may report this error at:
50 error     <https://github.com/npm/npm/issues>
51 verbose exit [ 1, true ]
kentcdodds commented 8 years ago

I'm not sure what's causing your issue. What version of node and npm are you using?

dmitriz commented 8 years ago
○ → node -v
v4.2.3
○ → npm -v
3.5.2
kentcdodds commented 8 years ago

I'm sorry, I'm not able to reproduce your issue myself. One thing you might double check is that you've got the peerDependencies like angular and api-check installed before you try to install angular-formly.

dmitriz commented 8 years ago

Have found the problem - there was

"name": "angular-formly"

inside my package.json, this answer helped me: http://stackoverflow.com/questions/27267707/npm-warn-install-refusing-to-install-hapi-as-a-dependency-of-itself

As usual, the npm error clarity has room for improvement :)

dmitriz commented 8 years ago

Sorry about the confusion!