question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

loadPartialConfig() throws Cannot destructure property `showIgnoredFiles` of 'undefined' or 'null' on v7.12.0

See original GitHub issue

vue 项目构建报错

项目之前是好的, 但是最近构建报错, 如下:

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, 他的实现如下 image

这一切的问题是因为 babel 并没有安装 samver 语义话版本造成, 期待对 loadPartialConfig 做一下兼容修复, 重新发布版本

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nicolo-ribaudocommented, Oct 16, 2020

Fixed in 7.12.3!

0reactions
MwumLicommented, Oct 16, 2020

@nicolo-ribaudo I can’t change it, because that vue/cli-plugin-babel call loadPartialConfig (), 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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found