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
[Bug]: Unable to use pako in create-react-app 5 with latest babel v7.20.x #15132
Comments
Hey @cmdcolin! 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. |
Might be dupe of #15111 can close if so! |
i'll just close my own issue, it's very likely a dupe :) |
It seems like a new issue. The line comment |
I think https://github.com/cmdcolin/pako_error_in_cra5 is using 7.20.2 of @babel/core can see in yarn.lock for details and it does still produce the error. do you think this issue should re-open? |
This is happening to me in angular as well.
@JLHwung Any eta on when the fix will be published? |
Same error with React JS.
|
Still getting the below error after taking the latest 7.20.3
|
@nakulkundra https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/package.json#L13-L14 |
@liuxingbaoyu tried what you suggested , but no luck,.
Not working, getting the below error.
Package File
` |
@nakulkundra What's the |
Hi @JLHwung. I added the ovveride:
My npm version: 8.19.3. But I am still getting the error. I was checking through the package lock. I found two listings of babel generator:
and
Any ideas? |
@srijanreddy98 What does |
@JLHwung it prints:
|
@srijanreddy98 The version seems good to me. Did you try removing the cache?
If it does not help, try removing the Since I can't reproduce the OP's issue on REPL, I believe it has been fixed in 7.20.3. If you think this is a Babel issue, please open a new issue with a reproducible repo. |
@JLHwung really appreciate your help. I was not able to fix it on the babel side of things. It was proving very difficult to pin down versions on babel side with no results popping up in my favour. (We typically use yarn but I even tried npm which has an easier way with overrides than yarn resolutions). For folks coming to this issue looking for resolutions:I resolved by pinning down the version of Pako to 2.1.0 (the latest version just released at the time of the comment to fix the babel problems). Check npm override or yarn resolutions to pin it down. To figure out which packages you need to pin the pako version: run My
So I added (for yarn):
|
💻
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
The file from pako is node_modules/pako/dist/pako.esm.mjs
The error from a build is
Configuration file name
package.json
Configuration
I use a default version of installing create-react-app with yarn.lock in https://github.com/cmdcolin/pako_error_in_cra5
Can eject the cra config to see details
Current and expected behavior
This I believe is a fairly recently change, and I'm not certain it's babel that does this type of conversion of comment formats. If this is not true I can redirect this issue elsewhere!
The code worked when my yarn.lock has e.g. ~7.19.x versions of babel packages, but started failing now at ~7.20.x. there are many babel packages so I'm not sure which but a diff between working and non-working is at this pastebin https://pastebin.com/xe3HSAgW
Environment
reproducible repo here https://github.com/cmdcolin/pako_error_in_cra5
Possible solution
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: