javascript - 求助,windows系统 管理员权限 nmp安装Yeoman,仍旧报错怎么解决啊?
高洛峰
高洛峰 2017-04-11 12:13:40
[JavaScript讨论组]

**

问题已经解决,npm的全局模块的存放路径没有配置好,参考 http://xiaoyaojones.blog.163....

**

C:\Users\hld-ln>node -v
v4.4.5

C:\Users\hld-ln>npm -v
2.15.5

C:\Users\hld-ln>npm install -g yo
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm a
nd is now out of date with respect to npm
npm ERR! tar.unpack untar error C:\Users\hld-ln\AppData\Roaming\npm-cache\string
_decoder\0.10.31\package.tgz
npm ERR! tar.unpack untar error C:\Users\hld-ln\AppData\Roaming\npm-cache\util-d
eprecate\1.0.2\package.tgz
npm ERR! tar.unpack untar error C:\Users\hld-ln\AppData\Roaming\npm-cache\string
_decoder\0.10.31\package.tgz
\
> spawn-sync@1.0.15 postinstall C:\Users\hld-ln\AppData\Roaming\npm\node_modules
\yo\node_modules\tabtab\node_modules\inquirer\node_modules\external-editor\node_
modules\spawn-sync
> node postinstall

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\\node.js\\node.exe" "D:\\node.js\\node_modules\\npm\\bin\\npm-
cli.js" "install" "-g" "yo"
npm ERR! node v4.4.5
npm ERR! npm  v2.15.5
npm ERR! path C:\Users\hld-ln\AppData\Roaming\npm\node_modules\yo\node_modules\y
eoman-environment\node_modules\mem-fs\node_modules\vinyl-file\node_modules\strip
-bom-stream\node_modules\first-chunk-stream\node_modules\readable-stream\node_mo
dules\string_decoder\index.js
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall open

npm ERR! Error: EPERM: operation not permitted, open 'C:\Users\hld-ln\AppData\Ro
aming\npm\node_modules\yo\node_modules\yeoman-environment\node_modules\mem-fs\no
de_modules\vinyl-file\node_modules\strip-bom-stream\node_modules\first-chunk-str
eam\node_modules\readable-stream\node_modules\string_decoder\index.js'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM: operation not permitted, open 'C:\Users\hld-ln\AppDat
a\Roaming\npm\node_modules\yo\node_modules\yeoman-environment\node_modules\mem-f
s\node_modules\vinyl-file\node_modules\strip-bom-stream\node_modules\first-chunk
-stream\node_modules\readable-stream\node_modules\string_decoder\index.js']
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'open',
npm ERR!   path: 'C:\\Users\\hld-ln\\AppData\\Roaming\\npm\\node_modules\\yo\\no
de_modules\\yeoman-environment\\node_modules\\mem-fs\\node_modules\\vinyl-file\\
node_modules\\strip-bom-stream\\node_modules\\first-chunk-stream\\node_modules\\
readable-stream\\node_modules\\string_decoder\\index.js' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\hld-ln\npm-debug.log
高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

全部回复(1)
伊谢尔伦

先 npm cache clean 试试

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号