loadPartialConfig() throws Cannot destructure property `showIgnoredFiles` of 'undefined' or 'null' on v7.12.0
See original GitHub issuevue 项目构建报错
项目之前是好的, 但是最近构建报错, 如下:
TypeError: Cannot destructure property `showIgnoredFiles` of 'undefined' or 'null'.
TypeError: Cannot destructure property `showIgnoredFiles` of 'undefined' or 'null'
at Function.<anonymous> (/Users/luo/WorkSpace/company/alarm/node_modules/@babel/core/lib/config/partial.js:132:7)
经过排查, 发现是 @babel/core
最新的版本 ^7.x.x 版本中发布了不兼容的变更
根据语义话版本号的描述, ^7.x.x 版本的发布应该是兼容性功能增强, 但是因为 API 的变更导致以前直接使用 babel.loadPartialConfig()
的库会报错, 比如项目使用了 @vue/cli-plugin-babel@4.1.1
, 他的实现如下
这一切的问题是因为 babel 并没有安装 samver 语义话版本造成, 期待对 loadPartialConfig
做一下兼容修复, 重新发布版本
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Allow Subfolders for External Storage - PHP server - GitAnswer
I can not add NAS because i need different permissions. ... loadPartialConfig() throws Cannot destructure property `showIgnoredFiles` of 'undefined' or ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed in 7.12.3!
@nicolo-ribaudo I can’t change it, because that
vue/cli-plugin-babel
callloadPartialConfig ()
, you can see the issue description above. And, https://github.com/babel/babel/blob/v7.12.1/packages/babel-core/src/config/partial.js#L73-L81 has modifed, only not publish to npm