0
Bei der Installation von PM2 mit "npm install -g" -Befehl, habe ich diesen Fehler. Ich weiß nicht, warum die "-g" -Option an das aktuelle Arbeitsverzeichnis angefügt wird und dann ENOENT (keine solche Datei oder Verzeichnis) zurückgibt. Wer dieses Problem hat, bitte helfen Sie das zu lösen. Vielen Dank im Voraus. Unten finden Sie das Protokoll bei der Installation:npm installieren get errno -2 mit seltsamen log
[[email protected] folder]# npm install –g [email protected]
npm ERR! addLocal Could not install /path/to/project/folder/–g
npm ERR! fetch failed https://registry.npmjs.org/pm2/-/pm2-1.0.1.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 400
npm ERR! fetch failed https://registry.npmjs.org/pm2/-/pm2-1.0.1.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 400
npm ERR! fetch failed https://registry.npmjs.org/pm2/-/pm2-1.0.1.tgz
npm ERR! Linux 2.6.32-431.el6.x86_64
npm ERR! argv "/opt/dtv/node-v4.2.6-linux-x64/bin/node" "/opt/dtv/node-v4.2.6-linux-x64/bin/npm" "install" "–g" "[email protected]"
npm ERR! node v4.2.6
npm ERR! npm v2.14.12
npm ERR! path /path/to/project/folder/–g
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/path/to/project/folder/–g'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
Ich denke, es ist nicht wichtig, ich in der Regel mit -g oder --save direkt hinter der installieren „npm installieren“ :( – thelonglqd