npm ERR! Log files were not written due to an error writing to the directory: D:\Program Files (x86)

配置前端环境报错:之前配置过vue环境,现在再次使用时报错。

npm ERR! Log files were not written due to an error writing to the directory: D:\Program Files (x86)_第1张图片

 

解决:

第一步:删除C:\Users\用户\下的.npmrc文件(我的是已经删除过了)

npm ERR! Log files were not written due to an error writing to the directory: D:\Program Files (x86)_第2张图片

 

第二步:在dos命令下输入:

npm cache clean --force

第三步:然后再输入命令:

npm install -g cnpm --registery=https://registery.npm.taobao.org

npm ERR! Log files were not written due to an error writing to the directory: D:\Program Files (x86)_第3张图片

出现这个界面就成功了。

你可能感兴趣的:(前端,node.js)