2013-10-03 39 views
10

Sto cercando di scaricare mangusta nel mio progetto node.js tramite npm.Impossibile installare Mongoose via NPM

Il comando è npm install mongoose. Tuttavia, questo porta all'output sottostante e alla fine porta a un errore. Le uniche cose nella directory mangusta sono le dipendenze (nella cartella node_modules). Qualsiasi altro pacchetto funzionerà, ma la mangusta fallisce ripetutamente. Ho provato npm install -g mongoose e sudo npm install mongoose, ma nessuno dei due funziona.

Qualche idea cosa potrebbe andare storto?

nodo versione 0.10.20

versione npm 1.3.11

$ npm install mongoose 
npm WARN package.json [email protected] No repository field. 
npm http GET https://registry.npmjs.org/mongoose 
npm http 304 https://registry.npmjs.org/mongoose 
npm http GET https://registry.npmjs.org/ms/0.1.0 
npm http GET https://registry.npmjs.org/sliced/0.0.5 
npm http GET https://registry.npmjs.org/hooks/0.2.1 
npm http GET https://registry.npmjs.org/muri/0.3.1 
npm http GET https://registry.npmjs.org/mongodb/1.3.19 
npm http GET https://registry.npmjs.org/regexp-clone/0.0.1 
npm http GET https://registry.npmjs.org/mpath/0.1.1 
npm http GET https://registry.npmjs.org/mpromise/0.2.1 
npm http 304 https://registry.npmjs.org/ms/0.1.0 
npm http 304 https://registry.npmjs.org/sliced/0.0.5 
npm http 304 https://registry.npmjs.org/hooks/0.2.1 
npm http 304 https://registry.npmjs.org/muri/0.3.1 
npm http 304 https://registry.npmjs.org/mongodb/1.3.19 
npm http 304 https://registry.npmjs.org/regexp-clone/0.0.1 
npm http 304 https://registry.npmjs.org/mpath/0.1.1 
npm http 304 https://registry.npmjs.org/mpromise/0.2.1 
npm ERR! Error: ENOENT, chmod '/Users/khanh/Code/bunnybots/node_modules/mongoose/node_modules/mongodb/index.js' 
npm ERR! If you need help, you may report this log at: 
npm ERR!  <http://github.com/isaacs/npm/issues> 
npm ERR! or email it to: 
npm ERR!  <[email protected]> 

npm ERR! System Darwin 11.4.2 
npm ERR! command "/Users/khanh/.nvm/v0.10.20/bin/node" "/Users/khanh/.nvm/v0.10.20/bin/npm" "install" "mongoose" 
npm ERR! cwd /Users/khanh/Code/bunnybots 
npm ERR! node -v v0.10.20 
npm ERR! npm -v 1.3.11 
npm ERR! path /Users/khanh/Code/bunnybots/node_modules/mongoose/node_modules/mongodb/index.js 
npm ERR! fstream_path /Users/khanh/Code/bunnybots/node_modules/mongoose/node_modules/mongodb/index.js 
npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! fstream_finish_call chmod 
npm ERR! code ENOENT 
npm ERR! errno 34 
npm ERR! fstream_stack /Users/khanh/.nvm/v0.10.20/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19 
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) 
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/Users/khanh/Code/bunnybots/node_modules/mongoose/node_modules/hooks' 
npm ERR! error rolling back [email protected] { [Error: ENOTEMPTY, rmdir '/Users/khanh/Code/bunnybots/node_modules/mongoose/node_modules/hooks'] 
npm ERR! error rolling back errno: 53, 
npm ERR! error rolling back code: 'ENOTEMPTY', 
npm ERR! error rolling back path: '/Users/khanh/Code/bunnybots/node_modules/mongoose/node_modules/hooks' } 
npm ERR! Error: ENOENT, open '/Users/khanh/Code/bunnybots/node_modules/mongoose/node_modules/mpath/package.json' 
npm ERR! If you need help, you may report this log at: 
npm ERR!  <http://github.com/isaacs/npm/issues> 
npm ERR! or email it to: 
npm ERR!  <[email protected]> 

npm ERR! System Darwin 11.4.2 
npm ERR! command "/Users/khanh/.nvm/v0.10.20/bin/node" "/Users/khanh/.nvm/v0.10.20/bin/npm" "install" "mongoose" 
npm ERR! cwd /Users/khanh/Code/bunnybots 
npm ERR! node -v v0.10.20 
npm ERR! npm -v 1.3.11 
npm ERR! path /Users/khanh/Code/bunnybots/node_modules/mongoose/node_modules/mpath/package.json 
npm ERR! code ENOENT 
npm ERR! errno 34 
npm ERR! Error: ENOENT, open '/Users/khanh/Code/bunnybots/node_modules/mongoose/node_modules/mpromise/README.md' 
npm ERR! If you need help, you may report this log at: 
npm ERR!  <http://github.com/isaacs/npm/issues> 
npm ERR! or email it to: 
npm ERR!  <[email protected]> 

npm ERR! System Darwin 11.4.2 
npm ERR! command "/Users/khanh/.nvm/v0.10.20/bin/node" "/Users/khanh/.nvm/v0.10.20/bin/npm" "install" "mongoose" 
npm ERR! cwd /Users/khanh/Code/bunnybots 
npm ERR! node -v v0.10.20 
npm ERR! npm -v 1.3.11 
npm ERR! path /Users/khanh/Code/bunnybots/node_modules/mongoose/node_modules/mpromise/README.md 
npm ERR! code ENOENT 
npm ERR! errno 34 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /Users/khanh/Code/bunnybots/npm-debug.log 
npm ERR! not ok code 0 
+3

Altre informazioni nel menzionato '/ Utenti/khanh/Codice/bunnybots/npm-debug.log'? Inoltre, prova a eseguire 'npm cache clean' e riprova. – robertklep

+0

Pulizia della cache funzionante. Ho tutti i file ora. Grazie! –

risposta

18

Usa npm cache clean.

Successivamente, installare normalmente e il download dovrebbe procedere correttamente.

+3

la sintassi corretta è 'npm cache clean' – kkern

Problemi correlati