我正在運行vagrant provision
,並且最後一步失敗,並顯示「錯誤安裝'gulp'」。見下文。Vagrant:錯誤安裝'gulp'
這是什麼意思,以及如何解決它?沒有人跑這個流浪腳本曾經有過這個問題。
Stderr from the command:
stdin: is not a tty
[ERROR ] Command 'npm install --silent --json --global "gulp"' failed with return code: 1
[ERROR ] stdout:
> [email protected] install /usr/local/lib/node_modules/gulp/node_modules/v8flags
> node fetch.js
[ERROR ] stderr: sh: 1: node: not found
[ERROR ] Error installing 'gulp': sh: 1: node: not found
我嘗試手動安裝$ sudo npm install --json --global "gulp"
但它給了我一個錯誤:
> [email protected] install /usr/local/lib/node_modules/gulp/node_modules/v8flags
> node fetch.js
sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
我找到了解決辦法:HTTP:// stackoverflow.com/questions/21168141/can-not-install-packages-using-node-package-manager-in-ubuntu – Vad 2014-10-29 21:14:30