当前位置: 首页 > 工具软件 > local-npm > 使用案例 >

vue---npm install报错踩坑总结

鲁洋
2023-12-01

报错信息1:

'webpack-dev-server' 不是内部或外部命令,也不是可运行的程序或批处理文件。

解决方法:

npm install webpack-dev-server -g

报错信息2:

npm ERR! cb() never called!

c:\Users\lenovo\Desktop\M_pro\user-security>npm i element-ui -S
npm WARN tar zlib error: unexpected end of file
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\lenovo\AppData\Roaming\npm-cache\_logs\2019-03-15T07_34_14
_352Z-debug.log

解决方法:

删除node_modules文件夹和 package-lock.json 文件,重新【npm install】


报错信息3:

npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall scandir

npm ERR! path c:\Users\lenovo\Desktop\M_pro\user-security\node_modules\fsevents
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall scandir
npm ERR! Error: EPERM: operation not permitted, scandir 'c:\Users\lenovo\Desktop
\M_pro\user-security\node_modules\fsevents'
npm ERR!  { Error: EPERM: operation not permitted, scandir 'c:\Users\lenovo\Desk
top\M_pro\user-security\node_modules\fsevents'
npm ERR!   stack: 'Error: EPERM: operation not permitted, scandir \'c:\\Users\\l
enovo\\Desktop\\M_pro\\user-security\\node_modules\\fsevents\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'scandir',
npm ERR!   path: 'c:\\Users\\lenovo\\Desktop\\M_pro\\user-security\\node_modules
\\fsevents' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\lenovo\AppData\Roaming\npm-cache\_logs\2019-03-15T07_59_19
_047Z-debug.log

解决方法:

使用npm指令清理缓存

npm cache clean --force

==============

持续更新中!

 类似资料: