-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
no-undef error after today's babel update #12864
Comments
Hey @divsbhalala! 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." |
I am also experiencing same without any changes in any of the package.json modules which were working previously. My class code sample -
Please help!! |
same. it started failing for us too. Trying to downgrade, unless someone has better explanation for this error! |
Count me in. In my package.json, I used
will print |
We are also facing the same issue with the new update, blocked for our builds. |
Same here. For now, just downgrading helps. |
I am also getting the same error on all js file |
How do we downgrade ? |
As a workaround, make sure that |
Tried but doesn't seem to work. |
Could you share your lockfile? |
With |
With, to check what could be causing the problem 🙏 |
Ok, give me a couple of minutes. Currently removed all node_modules and lock file and trying to reinstall everything from zero. |
Here is the lock file - |
our create-react-app 's class components are failing with no-undef error for arrow functions. looks like recent update of babel might be the cause. any workaround to fix it? |
Also the eslint file
|
I am using the below babel package and getting the same error from the last 6hour
|
My workaround, adding following in package.json:
|
does this work for create-react-app based project? |
Working on this, the fix should be out soon. |
Awesome, @nicolo-ribaudo . |
I also have the same error,please fix it soon。 |
In my use-case, eslint-parser was not seeing the React class component's prop-types. So this works:
But this doesn't work:
I get the 'react/prop-types' error while building the project. I suspect the class syntax implementation has a bug. |
@cemalettin-simsoft In that case the problem is that In this case it's broken by us because we implemented ESTree-like class features in 7.13.0, but it would have also be broken if ESLint natively started supporting class features. |
Okay, but what's the resolution? |
The solution is to wait until https://github.com/babel/babel/actions/runs/592238145 finishes and then update |
updating @babel/eslint-parser to v7.13.4 solves this issue 🚀 |
Thanks for confirming it 🚀 💛 |
I had this issue last night with our CI pipeline during a release. Safe to say, not very pleasant. Instead of downgrading or updatind packages, I resolved it by rewriting the state definition to:
I hope this helps |
I can also confirm that it's resolved. Thank you so much @nicolo-ribaudo for your quick help. The good thing is, it did work without any changes :). Even using |
Yeah, I completely reverted the PR in the ESLint case to make it sure that as many things as possible start working again 😅 |
Thanks @nicolo-ribaudo |
Hi @nicolo-ribaudo In my case this error persists even with the latest version, it's weird because another team member tries a clean install with the same repository and for him works (he uses linux, and I'm running on mac, I think that is the only difference). I've fixed with a workaround forcing resolutions for these packages, but I know that is not a definitive solution: Here is my yarn.lock (yarn-bug.lock) and his lock (yarn-working.lock) All is working fine last week, now throws these errors on all class components with class methods. |
Those packages you put in |
no-undef error after today's babel update
The text was updated successfully, but these errors were encountered: