moscajs / mosca

MQTT broker as a module
mosca.io
3.2k stars 513 forks source link

error Refusing to install mosca as a dependency #714

Closed syaifuri closed 6 years ago

syaifuri commented 6 years ago

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'install', 1 verbose cli 'mosca' ] 2 info using npm@3.10.10 3 info using node@v6.11.5 4 silly loadCurrentTree Starting 5 silly install loadCurrentTree 6 silly install readLocalPackageData 7 silly fetchPackageMetaData mosca 8 silly fetchNamedPackageData mosca 9 silly mapToRegistry name mosca 10 silly mapToRegistry using default registry 11 silly mapToRegistry registry https://registry.npmjs.org/ 12 silly mapToRegistry data Result { 12 silly mapToRegistry raw: 'mosca', 12 silly mapToRegistry scope: null, 12 silly mapToRegistry escapedName: 'mosca', 12 silly mapToRegistry name: 'mosca', 12 silly mapToRegistry rawSpec: '', 12 silly mapToRegistry spec: 'latest', 12 silly mapToRegistry type: 'tag' } 13 silly mapToRegistry uri https://registry.npmjs.org/mosca 14 verbose request uri https://registry.npmjs.org/mosca 15 verbose request no auth needed 16 info attempt registry request try #1 at 05:40:29 17 verbose request id 43b0e81c4221ca0c 18 verbose etag "5a2f47d0-44f6a" 19 verbose lastModified Tue, 12 Dec 2017 3:06:56 GMT 20 http request GET https://registry.npmjs.org/mosca 21 http 304 https://registry.npmjs.org/mosca 22 verbose headers { date: 'Wed, 20 Dec 2017 22:40:36 GMT', 22 verbose headers via: '1.1 varnish', 22 verbose headers 'cache-control': 'max-age=300', 22 verbose headers etag: '"5a2f47d0-44f6a"', 22 verbose headers age: '304', 22 verbose headers connection: 'keep-alive', 22 verbose headers 'x-served-by': 'cache-sin18023-SIN', 22 verbose headers 'x-cache': 'HIT', 22 verbose headers 'x-cache-hits': '1', 22 verbose headers 'x-timer': 'S1513809636.342361,VS0,VE0', 22 verbose headers vary: 'Accept-Encoding, Accept' } 23 silly get cb [ 304, 23 silly get { date: 'Wed, 20 Dec 2017 22:40:36 GMT', 23 silly get via: '1.1 varnish', 23 silly get 'cache-control': 'max-age=300', 23 silly get etag: '"5a2f47d0-44f6a"', 23 silly get age: '304', 23 silly get connection: 'keep-alive', 23 silly get 'x-served-by': 'cache-sin18023-SIN', 23 silly get 'x-cache': 'HIT', 23 silly get 'x-cache-hits': '1', 23 silly get 'x-timer': 'S1513809636.342361,VS0,VE0', 23 silly get vary: 'Accept-Encoding, Accept' } ] 24 verbose etag https://registry.npmjs.org/mosca from cache 25 verbose get saving mosca to C:\Users\syaifuri\AppData\Roaming\npm-cache\registry.npmjs.org\mosca.cache.json 26 verbose correctMkdir C:\Users\syaifuri\AppData\Roaming\npm-cache 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 Finishing 42 silly install printInstalled 43 verbose stack Error: Refusing to install mosca as a dependency of itself 43 verbose stack at checkSelf (C:\Program Files\nodejs\node_modules\npm\lib\install\validate-args.js:53:14) 43 verbose stack at Array. (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8) 43 verbose stack at LOOP (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:15:14) 43 verbose stack at chain (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:20:5) 43 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\install\validate-args.js:16:5 43 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\async-map.js:52:35 43 verbose stack at Array.forEach (native) 43 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\async-map.js:52:11 43 verbose stack at Array.forEach (native) 43 verbose stack at asyncMap (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\async-map.js:51:8) 44 verbose cwd C:\Arduino\08_MQTT\Broker\Mosca 45 error Windows_NT 10.0.15063 46 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "mosca" 47 error node v6.11.5 48 error npm v3.10.10 49 error code ENOSELF 50 error Refusing to install mosca as a dependency of itself 51 error If you need help, you may report this error at: 51 error https://github.com/npm/npm/issues 52 verbose exit [ 1, true ]

mcollina commented 6 years ago

Your current folder is mosca, or/and you have put mosca as the name in your package.json. the name should not conflict.