vue2安裝vue-router报错

npm install [email protected] --save

npm ERR! code 1
npm ERR! path F:\program\shangpinhui\shangpinhui\node_modules\[email protected]@less-loader
npmERR! command failed
npmERR! command C:\WINDOWS\system32\cmd.exe /d /s /c npm run buildnpm ERR! > [email protected] prebuild
npm ERR! > npm run clean
npm ERR!
npm ERR!
npm ERR! > [email protected] clean
npm ERR! > del-cli dist
npm ERR! 'del-cli' �����ڲ����ⲿ���Ҳ���ǿ����еij���

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\chena\AppData\Local\npm-cache\_logs\2022-10-07T14_00_33_865Z-debug-0.log

vue2安裝vue-router报错_第1张图片

解决办法:

首先运行 npm cache clean --force 

然后删除node_model文件

再次运行 npm install [email protected]  --legacy-peer-deps --save

 

你可能感兴趣的:(vue,vue.js,npm,javascript)