2014-10-28 79 views
1

我正在運行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 
+0

我找到了解決辦法:HTTP:// stackoverflow.com/questions/21168141/can-not-install-packages-using-node-package-manager-in-ubuntu – Vad 2014-10-29 21:14:30

回答

0

NPM是Node.js的安裝程序包,你的錯誤消息指出節點找不到。

  1. 是否將節點安裝爲設置的一部分?
  2. 節點的路徑是否正確設置?
+0

我的錯誤狀態npm無法安裝吞嚥。當我嘗試手動安裝gulp時,出現訪問錯誤。它看起來像這個目錄不能被創建:/ usr/local/lib/node_modules/gulp/node_modules/v8flags – Vad 2014-10-29 14:37:24

+0

對不起,誤讀錯誤。我認爲這是一個文件權利問題。當我使用包管理器安裝節點時,我遇到過這種情況。在全球範圍內安裝gulp時,可能會使用sudo進行快速而骯髒的修復。 – 2014-10-29 15:06:17

+0

謝謝。我試過了,更新已添加到上面的問題中。 – Vad 2014-10-29 15:27:08