2014-02-25 1 views
9

Ich habe 2 ENOENT Fehler. Ich weiß, "ENOENT" bedeutet "Error NO ENTrance", aber was genau fehlt in diesen beiden ENOENTs? Was bedeuten diese Fehlermeldungen? Ich möchte sie entschlüsseln, um die Probleme debuggen zu können.Wie npm ENOENT Fehler zu lesen

npm ERR! Error: ENOENT, lstat '/home/ubuntu/.npm/iconv-lite/0.2.11/package/encodings/table/gbk.js' 
npm ERR! If you need help, you may report this *entire* log, 
npm ERR! including the npm and node versions, at: 
npm ERR!  <http://github.com/npm/npm/issues> 

npm ERR! System Linux 3.2.0-54-virtual 
npm ERR! command "/home/ubuntu/local/bin/node" "/home/ubuntu/local/bin/npm" "install" 
npm ERR! cwd /home/ubuntu/app_e 
npm ERR! node -v v0.10.26 
npm ERR! npm -v 1.4.3 
npm ERR! path /home/ubuntu/.npm/iconv-lite/0.2.11/package/encodings/table/gbk.js 
npm ERR! fstream_path /home/ubuntu/.npm/iconv-lite/0.2.11/package/encodings/table/gbk.js 
npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! code ENOENT 
npm ERR! errno 34 
npm ERR! fstream_stack /home/ubuntu/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26 
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) 

und

npm ERR! Error: ENOENT, chmod '/home/ubuntu/app_f/node_modules/grunt/lib/grunt/util.js' 
npm ERR! If you need help, you may report this *entire* log, 
npm ERR! including the npm and node versions, at: 
npm ERR!  <http://github.com/npm/npm/issues> 

npm ERR! System Linux 3.2.0-54-virtual 
npm ERR! command "/home/ubuntu/local/bin/node" "/home/ubuntu/local/bin/npm" "install" 
npm ERR! cwd /home/ubuntu/app_f 
npm ERR! node -v v0.10.26 
npm ERR! npm -v 1.4.3 
npm ERR! path /home/ubuntu/app_f/node_modules/grunt/lib/grunt/util.js 
npm ERR! fstream_path /home/ubuntu/app_f/node_modules/grunt/lib/grunt/util.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 /home/ubuntu/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19 
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) 
npm http GET https://registry.npmjs.org/graceful-fs 

One scheint ein "lstat" Problem auf gbk.js zu haben, der andere ein "chmod" Problem auf util.js, aber was über die Befehle "Knoten", "npm" und "install", "cwd", "fstream" und Object.oncomplete?

Hier ist writer.js:284. Hier ist writer.js:305.

Antwort

6

Lesen der Fehlerzeile: Error: ENOENT, lstat '/home/ubuntu/.npm/iconv-lite/0.2.11/package/encodings/table/gbk.js'

Es bedeutet, dass, wenn so etwas fs.lstat('/home/ubuntu/.npm/iconv-lite/0.2.11/package/encodings/table/gbk.js', ...) tun, npm ENOENT Fehler empfangen. Was bedeutet, dass die Datei fehlte, aber npm erwartet, dass sie da ist.

Und für die zweite, npm war etwas wie fs.chmod('/home/ubuntu/app_f/node_modules/grunt/lib/grunt/util.js', ...) und npm erhalten ENOENT Fehler.

Der Rest sind Debug-Informationen. Diese alle sind einige Variablen/Eigenschaften im Zeitfehler passiert:

npm ERR! System Linux 3.2.0-54-virtual --> THis is the system type 
npm ERR! command "/home/ubuntu/local/bin/node" "/home/ubuntu/local/bin/npm" "install" --> the command that was issued 
npm ERR! cwd /home/ubuntu/app_f --> The current working directory 
npm ERR! node -v v0.10.26 --> You should know this one! 
npm ERR! npm -v 1.4.3 --> You should know this one! 
npm ERR! path /home/ubuntu/app_f/node_modules/grunt/lib/grunt/util.js 

Dies sind etwa fstream module. Es zeigt an, was es genau gemacht hat.

npm ERR! fstream_path /home/ubuntu/app_f/node_modules/grunt/lib/grunt/util.js 
npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! fstream_finish_call chmod 

Dies ist die stacktrace (so etwas wie Ausgabe von conosle.log(new Error().stack)), wenn der Fehler passiert ist:

npm ERR! fstream_stack /home/ubuntu/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19 
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) 
1

Eine Marotte mit dem Lesen NPM-Protokolle: Muss ich schauen auf den ersten Fehler in dem Stream. Ein Fehler im Upstream-Modus kann dazu führen, dass Dateien nicht mehr vorhanden sind. Dies führt zu vielen Fehlern, wie Sie sie oben beschrieben haben.

Versuchen Sie, zum Anfang des Protokolls zu gehen, und scrollen Sie dann nach unten, bis Sie den ersten Fehler gefunden haben.