2016-05-18 52 views
1

我想在cmd中使用下面的命令來安裝約曼安裝約曼:ENOENT錯誤,當試圖從NPM

npm install --global yo 

我得到如下:

npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm 
npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\{userdir}\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "--global" "yo" 
npm ERR! node v4.4.4 
npm ERR! npm v3.9.0 
npm ERR! path C:\{userDIr}\AppData\Roaming\npm\node_modules\yo\lib\cli.js 
npm ERR! code ENOENT 
npm ERR! errno -4058 
npm ERR! syscall chmod 

npm ERR! enoent ENOENT: no such file or directory, chmod 'C:{userDir}\AppData\Roaming\npm\node_modules\yo\lib\cli.js' 
npm ERR! enoent ENOENT: no such file or directory, chmod 'C:\{userDir}\AppData\Roaming\npm\node_modules\yo\lib\cli.js' 
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 ERR! Please include the following file with any support request: 
npm ERR!  C:\{userDir}\npm-debug.log 

下安裝:

  • 的Node.js v4.4.4
  • NPM v2.15.1,v3.9.0(我試着用兩個版本,我有完全相同的輸出消息)

和我的電腦運行在Windows 7 x64上。

解決方案我想:

  1. 我跑

    NPM緩存明確

,但沒有運氣。

  1. 我卸載並重新安裝了node.js,但沒有任何更改。
  2. 我也試過如下:

    • 刪除的文件夾node_modules

    • 刪除C:\\應用程序數據\漫遊\ NPM-緩存文件夾

    • 選中並應用於只讀的C:\ AppData \ Roaming \ npm文件夾的屬性
  3. 我在這裏閱讀所有相關問題的答案,但沒有任何內容elped。

在此之前,我成功安裝亭子 v1.7.9和咕嚕 V1.2.0與故宮,執行

npm install --global yo bower grunt-cli 

任何幫助將不勝感激。

回答