-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Does core require a new babel loader? #4112
Comments
It does if your build system picks up the blueprint/packages/core/package.json Line 7 in cd55cc1
This build target was added in #3230... but now I'm looking at the tsconfig options documentation and Sorry for the unintentional break @pudo @maclockard @ericanderson I wonder if you have any insight here? |
@pudo this is happening since you are directly importing an An easy and quick way would be to upgrade to a new version of babel, since they added support for both optional chaining and nullish coalescing in 7.8.0 (CHANGELOG). I'm not too sure about your setup or create-react-app's setup, but upgrading to a newer version of create-react-app should fix this, looks like newer versions are on babel 7.9.6 (link) which should cover this. If upgrading create-react-app is not an option, you can maybe try to force resolve the transitive dependency in your repo. Not sure how to do this with An option with slightly longer turn around would be for blueprint to add another target like |
Just wanted to chime in and say that I have the very same issue and most likely since I am importing the |
@ChristianIvicevic are you unable to upgrade babel versions? that's the quick resolution outlined above. You will also need to make sure you babel blueprint as a part of your build process. |
@maclockard Thank you for your fast reply. I am currently running react-scripts 3.4.1 which uses babel 7.9.0. I assume that upgrading other dependencies caused the lockfile to be partially regenerated since everything worked with blueprint 3.25.0 a few moments ago. So I am already running the latest published version of react-scripts with the respective babel version. Since I haven't ejected I am not in control of the. underlying babel configuration and versions and would prefer not to mess around with it too much and I don't actually know how to enforce a newer babel version to used right now. Out of curiousity I tried removing the HotkeysTarget reference entirely and get the same error, so it's "just" a compilation error when attempting to import |
can you copy and paste your compilation error? I would expect that version of babel to be able to properly handle an optional chain operator. |
It's virtually the same that OP had.
|
I found a bizzare fix! It is described in the following PR: facebook/create-react-app#8526 The |
ah interesting, that makes sense |
Quick update, adding (Nevertheless I'd appreciate that |
Thanks for the comprehensive feedback on this. The work-around of specifying |
The error is thrown from acorn 6 in webpack 4, it is fixed in webpack 5: webpack/webpack#11186 Unfortunately due to breaking changes from acorn 6.4.0 to 7.0.0, webpack 4 can not ship acorn 8, which supports optional chaining. Specifying Alternatively, you can also wait until CRA updates to webpack 5: facebook/create-react-app#7929, when webpack 5 is used, please remove |
- had to update eslint deps - ran into palantir/blueprint#4112 - had to move beta.svg out of static/ - had to fix prettier formatting changes - ran into jestjs/jest#7780
- had to update eslint deps - ran into palantir/blueprint#4112 - had to move beta.svg out of static/ - had to fix prettier formatting changes - ran into jestjs/jest#7780
- had to update eslint deps - ran into palantir/blueprint#4112 - had to move beta.svg out of static/ - had to fix prettier formatting changes - ran into jestjs/jest#7780
- had to update eslint deps - ran into palantir/blueprint#4112 - had to move beta.svg out of static/ - had to fix prettier formatting changes - ran into jestjs/jest#7780
I don't think there's any more action on Blueprint's part required here. By definition, the Also, re: the last comment in this thread, Webpack 5 has been out for some time now and we have now upgraded to it in this repo without any issues. |
Environment
If possible, link to a minimal repro (fork this code sandbox): https://github.com/alephdata/aleph/blob/master/ui/package.json
Steps to reproduce
create-react-app
app.Actual behavior
Possible solution
Not clear on what further configuration is required.
The text was updated successfully, but these errors were encountered: