我正在尝试使用cmd中的以下命令安装Yeoman:
npm install --global yo
我得到以下内容:
npm WARN deprecated npmconf@2.1.2: 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
安装以下内容:
我的电脑在Windows 7 x64上运行。
我尝试过的解决方案:
我跑
npm缓存清除
但没有运气。
我也尝试了以下内容:
删除了node_modules文件夹
已删除C:\\ AppData \ Roaming \ npm-cache文件夹
在此之前,我使用npm成功安装 bower v1.7.9和 grunt v1.2.0,执行
npm install --global yo bower grunt-cli
任何帮助将不胜感激。
答案 0 :(得分:1)
根据https://github.com/npm/npm/issues/10312和https://github.com/yeoman/yo/issues/437,问题是 yo v1.8.2 。
执行
npm install --global yo@1.8.1
而不是
npm install --global yo
解决了这个问题,虽然很快就会发布一个修补程序。