babel: [Bug]: Release 7.17.0 breaks downstream plugins
💻
- Would you like to work on a fix?
How are you using Babel?
babel-loader (webpack)
Input code
import { SomeComponent } from '~/some/aliased/path`;
Configuration file name
No response
Configuration
No response
Current and expected behavior
Not to break downstream plugins
Environment
- @babel/core 7.17.0
- Node v12.13.0
- NPM v6.12.0
Possible solution
No response
Additional context
This is the error that started occurring after updating from @babel/core: 7.16.12
to 7.17.0
[eslint-import-resolver-babel-module] TypeError: [BABEL] C:\Redacted\src\components\ui\Nav\AccountMenu\AccountMenu.js: Cannot add property 1, object is not extensible
at Array.push (<anonymous>)
at C:\Redacted\node_modules\@babel\core\lib\config\full.js:314:26
at Generator.next (<anonymous>)
at Function.<anonymous> (C:\Redacted\node_modules\@babel\core\lib\gensync-utils\async.js:25:3)
at Generator.next (<anonymous>)
at evaluateSync (C:\Redacted\node_modules\gensync\index.js:251:28)
at Function.sync (C:\Redacted\node_modules\gensync\index.js:89:14)
at sync (C:\Redacted\node_modules\@babel\core\lib\gensync-utils\async.js:68:25)
at sync (C:\Redacted\node_modules\gensync\index.js:182:19)
at onFirstPause (C:\Redacted\node_modules\gensync\index.js:210:24)
at Generator.next (<anonymous>)
at cachedFunction (C:\Redacted\node_modules\@babel\core\lib\config\caching.js:66:46)
at cachedFunction.next (<anonymous>)
at loadPluginDescriptor (C:\Redacted\node_modules\@babel\core\lib\config\full.js:282:17)
at loadPluginDescriptor.next (<anonymous>)
at loadPluginDescriptors (C:\Redacted\node_modules\@babel\core\lib\config\full.js:170:33)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 15 (9 by maintainers)
Commits related to this issue
- lower, maybe that works seems related to https://github.com/babel/babel/issues/14233 — committed to algolia/vue-instantsearch by Haroenv 2 years ago
- ci(vue3): pin lower version of @babel/core (#1110) * ci * try patching * existing versions * lower, maybe that works seems related to https://github.com/babel/babel/issues/14233 — committed to algolia/vue-instantsearch by Haroenv 2 years ago
@nicolo-ribaudo thank you for promptly addressing this. I will pin to 7.16 until #14241 gets merged! Have a good weekend!
Thanks @l0gicgate; I was able to trim your repository down even more (first removing webpack, and then some ESLint stuff), and I managed to create a reproduction that only uses Babel (https://github.com/babel/babel/pull/14241).
However, I will not be available much this weekend and next week, so it might take a while before I fix it. In the meantime, please pin
@babel/core
to the last working version (e.g.~7.16.0
).@nicolo-ribaudo I stripped everything down as best as I could with minimal dependencies to reproduce the issue. Here’s the repository: https://github.com/l0gicgate/babel-core-issue-14233
Let me know if you need anything else
@nicolo-ribaudo here’s my babel config:
This is related to the
extendedDependencies
tracking. When loading a plugin, we usually:externalDependencies
array for the pluginexternalDependencies
of the inherited plugin into theexternalDependencies
of the plugin we are loadingexternalDependencies
of the plugin we are loadingHowever, for some reason
externalDependencies
of the plugin we are loading is already frozen at step 2.2: I don’t understand why it’s possible, so we need to know which plugin is causing this.