Webpack打包异常:HarmonyImportSpecifierDependency.jsxxx TypeError: Cannot read property 'buildMeta' of undefined
内容目录

问题表象如下

"C:Program Filesnodejsyarn.cmd" run buildRelease
yarn run v1.22.22
$ vue-cli-service build --mode release
All browser targets in the browserslist configuration have supported ES module.
Therefore we don't build two separate bundles for differential loading.

|  Building for release...D:Gitfit2cloud-web-clinode_moduleswebpacklibdependenciesHarmonyImportSpecifierDependency.js:221
                                (moduleGraph.getParentModule(this)).buildMeta
                                                                    ^

TypeError: Cannot read property 'buildMeta' of undefined
    at HarmonyImportSpecifierDependency._getEffectiveExportPresenceLevel (D:Gitfit2cloud-web-clinode_moduleswebpacklibdependenciesHarmonyImportSpecifierDependency.js:221:41)
    at HarmonyImportSpecifierDependency.getWarnings (D:Gitfit2cloud-web-clinode_moduleswebpacklibdependenciesHarmonyImportSpecifierDependency.js:234:32)
    at Compilation.reportDependencyErrorsAndWarnings (D:Gitfit2cloud-web-clinode_moduleswebpacklibCompilation.js:3450:24)
    at D:Gitfit2cloud-web-clinode_moduleswebpacklibCompilation.js:3008:28
    at eval (eval at create (D:Gitfit2cloud-web-clinode_modulestapablelibHookCodeFactory.js:33:10), <anonymous>:29:1)
    at D:Gitfit2cloud-web-clinode_moduleswebpacklibFlagDependencyExportsPlugin.js:404:10
    at D:Gitfit2cloud-web-clinode_modulesneo-asyncasync.js:2830:7
    at Object.each (D:Gitfit2cloud-web-clinode_modulesneo-asyncasync.js:2850:39)
    at D:Gitfit2cloud-web-clinode_moduleswebpacklibFlagDependencyExportsPlugin.js:374:17
    at D:Gitfit2cloud-web-clinode_modulesneo-asyncasync.js:2830:7
    at done (D:Gitfit2cloud-web-clinode_modulesneo-asyncasync.js:2865:11)
    at D:Gitfit2cloud-web-clinode_modulesneo-asyncasync.js:2818:7
    at D:Gitfit2cloud-web-clinode_moduleswebpacklibFlagDependencyExportsPlugin.js:102:10
    at D:Gitfit2cloud-web-clinode_moduleswebpacklibCache.js:97:34
    at Array.<anonymous> (D:Gitfit2cloud-web-clinode_moduleswebpacklibcacheMemoryWithGcCachePlugin.js:129:13)
    at D:Gitfit2cloud-web-clinode_moduleswebpacklibCache.js:97:19
    at eval (eval at create (D:Gitfit2cloud-web-clinode_modulestapablelibHookCodeFactory.js:33:10), <anonymous>:27:1)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

进程已结束,退出代码为 1

开发调试完之后每次打包的时候都会遇到这个问题,当时处理方式基本上都是重新下载node_module才能解决,太麻烦了

后面去查了一下文件系统,觉得可能是缓存,可以在每次打包之前删一下保证正常就可以了,执行下面语句↓

rm -rf node_modules/.cache/webpack

OK,备忘一下

hi,我是秋田猫,很高兴认识你,或许我们可以相互分享各自领域的”宝藏“,祝天天开心~
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇