npm installieren scheitern

Werde ich beginnen mit den Worten, dass ich weiter keine Erfahrung in der Arbeit im terminal oder mit node.js.

Mitarbeiter Links für den Urlaub, und ich versuche, Anweisungen zu Folgen, verließ er für den Aufbau seiner app auf unserem demo-server. Ich kann alles lokal läuft, bin aber in Probleme laufen auf dem server installieren-Buchse.io-Modul.

Installiert python, nodejs installiert, beide erfolgreich. Aber dann habe ich den Befehl:

npm install -g socket.io

Und die Ausgabe die ich bekomme, ist:

npm http GET https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/socket.io
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/socket.io'
npm ERR!  { [Error: EACCES, mkdir '/usr/local/lib/node_modules/socket.io']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/usr/local/lib/node_modules/socket.io',
npm ERR!   fstream_type: 'Directory',
npm ERR!   fstream_path: '/usr/local/lib/node_modules/socket.io',
npm ERR!   fstream_class: 'DirWriter',
npm ERR!   fstream_stack:
npm ERR!    [ 'DirWriter._create (/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23)',
npm ERR!      '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53',
npm ERR!      'Object.oncomplete (fs.js:297:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 2.6.32-279.el6.x86_64
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "socket.io"
npm ERR! cwd /home/qa
npm ERR! node -v v0.8.16
npm ERR! npm -v 1.1.69
npm ERR! path /usr/local/lib/node_modules/socket.io
npm ERR! fstream_path /usr/local/lib/node_modules/socket.io
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/socket.io'
npm ERR! fstream_stack DirWriter._create (/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23)
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:297:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/qa/npm-debug.log
npm ERR! not ok code 0

Das Konto, das ich bin, sollte Administratorrechte haben. Googeln herum fand ich einige Vorschläge, aber keiner schien für mich arbeiten. Versucht voranstellen Befehl mit sudo bekomme aber:

[qa@umr-demo ~]sudo npm install -g socket.io
[sudo] password for qa:
sudo: npm: command not found
  • Was bedeutet which npm Ausgabe, wenn Sie es eingeben?
InformationsquelleAutor Danny | 2012-12-20
Schreibe einen Kommentar