拿了别人的项目来,npm install成功,运行后报错:
12:07:46.629 ERROR Error: Cannot find module 'webpack/lib/RuleSet'
12:07:46.638 Require stack:
12:07:46.638 - /Users/zhaoliangchen/Desktop/zrhs/tobacco-customer/tobacco-customer-mobile/node_modules/@dcloudio/vue-cli-plugin-uni/lib/configure-webpack.js
12:07:46.646 - /Users/zhaoliangchen/Desktop/zrhs/tobacco-customer/tobacco-customer-mobile/node_modules/@dcloudio/vue-cli-plugin-uni/index.js
12:07:46.647 - /Users/zhaoliangchen/Desktop/zrhs/tobacco-customer/tobacco-customer-mobile/node_modules/@vue/cli-service/lib/Service.js
12:07:46.657 - /Users/zhaoliangchen/Desktop/zrhs/tobacco-customer/tobacco-customer-mobile/node_modules/@vue/cli-service/bin/vue-cli-service.js
12:07:46.657 Error: Cannot find module 'webpack/lib/RuleSet'
12:07:46.680 Require stack:
12:07:46.681 - /Users/zhaoliangchen/Desktop/zrhs/tobacco-customer/tobacco-customer-mobile/node_modules/@dcloudio/vue-cli-plugin-uni/lib/configure-webpack.js
12:07:46.691 - /Users/zhaoliangchen/Desktop/zrhs/tobacco-customer/tobacco-customer-mobile/node_modules/@dcloudio/vue-cli-plugin-uni/index.js
12:07:46.702 - /Users/zhaoliangchen/Desktop/zrhs/tobacco-customer/tobacco-customer-mobile/node_modules/@vue/cli-service/lib/Service.js
12:07:46.703 - /Users/zhaoliangchen/Desktop/zrhs/tobacco-customer/tobacco-customer-mobile/node_modules/@vue/cli-service/bin/vue-cli-service.js
12:07:46.719 at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
12:07:46.721 at Function.Module._resolveFilename (/Users/zhaoliangchen/Desktop/zrhs/tobacco-customer/tobacco-customer-mobile/node_modules/module-alias/index.js:49:29)
12:07:46.736 at Function.Module._load (internal/modules/cjs/loader.js:667:27)
12:07:46.737 at Module.require (internal/modules/cjs/loader.js:887:19)
12:07:46.752 at require (internal/modules/cjs/helpers.js:74:18)
12:07:46.754 at Object.<anonymous> (/Users/zhaoliangchen/Desktop/zrhs/tobacco-customer/tobacco-customer-mobile/node_modules/@dcloudio/vue-cli-plugin-uni/lib/configure-webpack.js:4:17)
12:07:46.770 at Module._compile (internal/modules/cjs/loader.js:999:30)
12:07:46.787 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
12:07:46.788 at Module.load (internal/modules/cjs/loader.js:863:32)
12:07:46.803 at Function.Module._load (internal/modules/cjs/loader.js:708:14)
w***@qtwo.fun
解决了 谢谢老哥
2022-03-08 16:48
1***@qq.com
可行可行
2022-06-15 11:13