-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Description
Bug Report
Hi There,
One of our builds on CI has just failed when we picked up the latest 7.7.0 release.
Building a react-native project is failing and we're getting this error :
error index.js: "" is not a valid identifer name
debug TypeError: "" is not a valid identifer name
at node_modules/metro/node_modules/@babel/types/lib/definitions/core.js:322:17
at Object.validate (node_modules/@babel/types/lib/definitions/utils.js:201:7)
at validateField (node_modules/metro/node_modules/@babel/types/lib/validators/validate.js:22:9)
at validate (node_modules/metro/node_modules/@babel/types/lib/validators/validate.js:16:3)
at builder (node_modules/metro/node_modules/@babel/types/lib/builders/builder.js:38:27)
at Object.Identifier (node_modules/metro/node_modules/@babel/types/lib/builders/generated/index.js:334:31)
at functionFromProgram (metro/src/ModuleGraph/worker/JsFileWrapping.js:71:7)
at Object.wrapModule (metro/src/ModuleGraph/worker/JsFileWrapping.js:39:19)
at node_modules/metro/src/JSTransformer/worker.js:323:52
This happend on circle CI right after 7.7.0 was published, on a code base that hasn't changed, and is building perfectly on other platforms where the dependencies haven't been installed.
The problem is that many packages (like the metro bundler) have @babel/core@^7.0.0 defined as dependency, so this is automatically picked up when using these dependencies. This is what happened to us this morning
Current Behavior
I expect my RN bundle to build 😬
Input Code
simply make sure 7.7.0 is resolved. if 7.6.3 or earlier is resolved, all is good
Environment
- Babel version(s): [7.7.0]
- Node/npm version: [Node 8]
- OS: [Ubuntu]
- Monorepo: [no]
- How you are using Babel: [react native metro bundler]
Possible Solution
remove that update