vue-cli(npm install webpack webpack-cli vue-cli -g)安装时报错

install时报错:

npm ERR! path D:\Program Files\nodejs\node_global\node_modules\webpack\node_modules\ajv-errors
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access 'D:\Program Files\nodejs\node_global\node_modules\webpack\node_modules\ajv-errors'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

如下图:
vue-cli(npm install webpack webpack-cli vue-cli -g)安装时报错_第1张图片
在这里插入图片描述

解决:
1、在本地找到报错内容提到的access后面的目录,然后把node_modules删除掉
2、重新install,就可以了

你可能感兴趣的:(vue-cli(npm install webpack webpack-cli vue-cli -g)安装时报错)