npm Refusing to Delete problem - 松风闲云

/ 0评 / 0

报错详情:

npm ERR! code EEXIST
npm ERR! path /var/www/vue/node_modules/@dcloudio/uni-quickapp-native/node_modules/@hap-toolkit/packager/node_modules/.bin/webpack
npm ERR! Refusing to delete /var/www/vue/node_modules/@dcloudio/uni-quickapp-native/node_modules/@hap-toolkit/packager/node_modules/.bin/webpack: containing path /var/www/vue/node_modules/@dcloudio/uni-quickapp-native/node_modules/@hap-toolkit/packager/node_modules/webpack isn't under npm's control
npm ERR! File exists: /var/www/vue/node_modules/@dcloudio/uni-quickapp-native/node_modules/@hap-toolkit/packager/node_modules/.bin/webpack
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

按照提示加 --force 参数无效。

解决方案:

删掉node_modules/ 目录,重新执行npm install

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注