安装完node之后, 测试全局安装一个最常用的 express 模块进行测试 失败,但是用管理员权限打开cmd 安装就成功。
报错如下:
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

关键字:管理员;
(我的问题好像配置环境的时候 ① npm config set prefix “你的路径\node_global”
②npm config set cache “你的路径\node_cache”配置不生效: )
解决:
方法一:
1.自己配置的文件夹权限不够
2.右键打开属性
3.编辑users

4.勾选完全控制

最低0.47元/天 解锁文章
4078

被折叠的 条评论
为什么被折叠?



