当前位置: 移动技术网 > IT编程>开发语言>JavaScript > 安装webpack常见错误之一

安装webpack常见错误之一

2019年03月17日  | 移动技术网IT编程  | 我要评论

我安装webpack时,出现如下错误:

c:\users\admin> npm install webpack -g
npm warn checkpermissions missing write access to c:\users\admin\appdata\roaming\npm\node_modules\webpack\node_modules\fsevents
npm err! path c:\users\admin\appdata\roaming\npm\node_modules\webpack\node_modules\fsevents
npm err! code enoent
npm err! errno -4058
npm err! syscall access
npm err! enoent enoent: no such file or directory, access 'c:\users\admin\appdata\roaming\npm\node_modules\webpack\node_modules\fsevents'
npm err! enoent this is related to npm not being able to find a file.
npm err! enoent

npm err! a complete log of this run can be found in:
npm err! c:\users\admin\appdata\roaming\npm-cache\_logs\2019-03-16t03_59_56_513z-debug.log

解决方法:删除这个路径下的文件c:\users\admin\appdata\roaming\npm\node_modules\webpack\node_modules

可以解决,之前遇到这个问题头痛一个上午,索性删了,重装,最后解决了问题,希望有同样问题的码友走更少的弯路。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网