New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error index.js: "" is not a valid identifer name error with 7.7.0 #10645
Comments
Hey @f-roland! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite." |
this is fairly urgent, as I believe 7.7.0 has unvoluntarily introduced a breaking change
somehow this must not be called properly, as when I logged the params after an error, here's what i have
|
For now, downgrading to |
@guyca not when the dependency is pulled from another package which defines |
@guyca besides, if you have to rollback for a feature to work, it means there's a breaking change in the version, and it shouldn't be |
We will publish a fix today (In about 2 hours). PS. I suggest using a lockfile to avoid problems with regressions like this one. |
We have lockfiles. But in some environments, you can generate a project and run yarn start on it, and therefore no lockfile. This is a semver violation ! |
Thanks @nicolo-ribaudo. When will the faulty versions be unpublished from npm ? |
FYI, react native community is deeply affected by this. |
Thanks @yuanfux - still waiting for the versions to be removed from the npm registry - that's the only real fix |
@nicolo-ribaudo this isn't resolved as long as the version is still on npm. Who can unpublish it ? |
https://www.npmjs.com/package/@babel/types/v/7.7.1 I will update the changelog later. |
@nicolo-ribaudo I don't think that will do... now the projects which have captured that in their cache won't work either... the best way to address this is to unpublish the version, not create a new one |
@nicolo-ribaudo confirmed that 7.7.1 works. Still think it'd be better to remove the faulty version though. NPM gives you 3 days after the initial publish for that. After that, it's too late to remove ! Anyway, thank you for resolving this fairly quickly. But it had a very big impact on a big chunk of the JS community, especially react-native developers |
Definitely an unfortunate Metro bug: https://github.com/facebook/metro/blob/690f175c2d88432521edd9cde55bfdd220588134/packages/metro/src/ModuleGraph/worker/JsFileWrapping.js#L81 An empty string is not a valid variable name and isn't a valid function name :( They should just be passing
Tracked in facebook/metro#481 |
and what with @babel/core? |
in my case the error has not gone away yet even with // update: found the issue. after removing |
@loganfsmyth fair enough, but still, the bundle build failures happened with babel 7.7.0 |
@f-roland Yep! My intention was only to provide context, not to argue against reverting this change. |
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 :
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 morningCurrent 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
Possible Solution
remove that update
The text was updated successfully, but these errors were encountered: