安装npm install -g webpack提示报错

C:\Users\long\vue_shop\vue_shop-1>npm install -g webpack

npm ERR! code EPERM

npm ERR! syscall mkdir

npm ERR! path C:\App\nodejs\node_cache\node_modules

npm ERR! errno -4048

npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\App\nodejs\node_cache\node_modules'

npm ERR! [Error: EPERM: operation not permitted, mkdir 'C:\App\nodejs\node_cache\node_modules'] {

npm ERR! errno: -4048,

npm ERR! code: 'EPERM',

npm ERR! syscall: 'mkdir',

扫描二维码关注公众号,回复: 17085025 查看本文章

npm ERR! path: 'C:\\App\\nodejs\\node_cache\\node_modules'

npm ERR! }

npm ERR!

npm ERR! The operation was rejected by your operating system.

npm ERR! It's possible that the file was already in use (by a text editor or antivirus),

npm ERR! or that you lack permissions to access it.

npm ERR!

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 ERR! A complete log of this run can be found in:

npm ERR! C:\Users\long\AppData\Local\npm-cache\_logs\2023-02-04T12_40_22_520Z-debug-0.log

C:\Users\long\vue_shop\vue_shop-1>npm install -g webpack

npm ERR! code EPERM

npm ERR! syscall mkdir

npm ERR! path C:\App\nodejs\node_cache\node_modules

npm ERR! errno -4048

npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\App\nodejs\node_cache\node_modules'

npm ERR! [Error: EPERM: operation not permitted, mkdir 'C:\App\nodejs\node_cache\node_modules'] {

npm ERR! errno: -4048,

npm ERR! code: 'EPERM',

npm ERR! syscall: 'mkdir',

npm ERR! path: 'C:\\App\\nodejs\\node_cache\\node_modules'

npm ERR! }

npm ERR!

npm ERR! The operation was rejected by your operating system.

npm ERR! It's possible that the file was already in use (by a text editor or antivirus),

npm ERR! or that you lack permissions to access it.

npm ERR!

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 ERR! A complete log of this run can be found in:

npm ERR! C:\Users\long\AppData\Local\npm-cache\_logs\2023-02-04T12_42_42_188Z-debug-0.log

C:\Users\long\vue_shop\vue_shop-1>

win+x打开终端后选择 终端 弹出命令提示符 在里面安装npm install -g webpack就可以

猜你喜欢

转载自blog.csdn.net/lv_suri/article/details/128885501