首页 > 求助,windows系统 管理员权限 nmp安装Yeoman,仍旧报错怎么解决啊?

求助,windows系统 管理员权限 nmp安装Yeoman,仍旧报错怎么解决啊?

**

问题已经解决,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

先 npm cache clean 试试


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

【热门文章】
【热门文章】