0
「npm install -g」コマンドでpm2をインストールすると、このエラーが発生します。 "-g"オプションが現在の作業ディレクトリに追加され、ENOENT(そのようなファイルやディレクトリはありません)が返される理由はわかりません 誰でもこの問題に直面しました。 事前に感謝します。インストール時に以下 はログです:npm install奇妙なログを持つerrno -2を取得
[[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
私はそれが重要ではないと思い、私は通常、「NPMインストール」の後ろに-gまたは--save権利をインストール:( – thelonglqd