ERROR Failed to compile with 541 errors 11:27:44 These dependencies were not found: * core-js/modules/es.array.concat.js in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./

 ERROR  Failed to compile with 541 errors                                                                                                       11:27:44

These dependencies were not found:

* core-js/modules/es.array.concat.js in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./

项目打包时出现了这种问题,是一个叫core-js的包出了问题;

解决方法是
1.是版本的问题,要重新install一下

npm install core-js@3 --save

# or

npm install core-js@2 --save

2.也有人给出了这种方法:(我用这种方法还是出现了些问题,如果上面那种方式没有解决你的问题,你可以再试试这种方式;或者两种方式都用,未尝不可。)

//在babel.config.js中添加

presets: [ [ "@vue/app", { useBuiltIns: "entry" } ] ]

详情参考这里:

useBuiltIns
core-js module error

接下来:
你可能出现过这种问题,没有直接忽视;

 ERROR  Failed to compile with 17 errors                                                                                                                   16:27:36
 error  in ./node_modules/vant/es/nav-bar/index.css

Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Loading PostCSS Plugin failed: Cannot find module 'postcss-pxtorem'

(@C:\Users\1234Wu\Desktop\eMeetUser\emeet_usermanual\.postcssrc.js)
    at load (C:\Users\1234Wu\Desktop\eMeetUser\emeet_usermanual\node_modules\postcss-load-config\src\plugins.js:28:11)
    at Object.keys.filter.map (C:\Users\1234Wu\Desktop\eMeetUser\emeet_usermanual\node_modules\postcss-load-config\src\plugins.js:53:16)
    at Array.map (<anonymous>)
    at plugins (C:\Users\1234Wu\Desktop\eMeetUser\emeet_usermanual\node_modules\postcss-load-config\src\plugins.js:52:8)
    at processResult (C:\Users\1234Wu\Desktop\eMeetUser\emeet_usermanual\node_modules\postcss-load-config\src\index.js:33:14)
    at config.search.then (C:\Users\1234Wu\Desktop\eMeetUser\emeet_usermanual\node_modules\postcss-load-config\src\index.js:94:14)

 @ ./node_modules/vant/es/nav-bar/index.css 4:14-143 14:3-18:5 15:22-151
 @ ./node_modules/vant/es/nav-bar/style/index.js
 @ ./src/main.ts
 @ multi (webpack)-dev-server/client?http://192.168.1.5:80/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts

 error  in ./src/App.vue?vue&type=style&index=0&lang=less&

Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Loading PostCSS Plugin failed: Cannot find module 'postcss-pxtorem

.....后面还有很多。

你看可以重新 install 一下找不到的那个插件();或者直接npm install 全部重新安装一下。因为我看到package.json中是有这些模块的,安装cli的时候他是已经安装好了的,不知道为什么,现在找不到了。重新npm install 一下就好了。

posted on   何苦->  阅读(1534)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示