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
Production build fails with Unexpected token #5519
Comments
We are getting the same error on our end as well |
Same here! Happens since the latest version. |
We have the same problem. Versions are:
|
This is an issue with Babel. You can track it at babel/babel#15300. |
same issue here ! |
I have started facing the same issue from today itself during the react script build. Attaching the sample here:
Anyone has found any workaround for this? |
Should be fixed in |
@Methuselah96 : I'm still getting the same error after deleting the package.lock file. |
Can you check what version of |
It shows |
That's not what specific version is installed, that's the version range. Can you copy-paste the section of the lock file that lists the actual installed version? |
Here it is. It's under package-lock.json file.
|
@Methuselah96 the issue is still the same, even though the version is up to date. I'm still facing the same error when creating a build.
|
Thanks, looks it it's still an issue according to babel/babel#15300. |
@Methuselah96 : Is there any quick workaround for this as of now? Upgrading the version of |
hey, Let me know if anyone finds any proper solution for this critical fix. |
I faced same issue and I downgraded react-select to 5.6.1 and remove yarn.lock file. After that I run "yarn install" and finally everythings works. |
Should be fixed in |
Using npm run build to create a optimized production build, of a React Typescript application, that includes the react-select component fails to compile with an error with @floating-ui dependency.
Currently I am not very certain if this i truly a bug with react-select or with its @floating-ui dependency.
I could reproduce the error on multiple maschines and i am currently unable to create a production build of my application.
I have also pulled the example code of the react-select v5 code( https://codesandbox.io/s/react-select-v5-sandbox-y5jtm) and have tried to create a production build and that also fails with the following error.
I get the same results wenn using version 5.0.1 and 5.7.0.
Additional if i create a new Typescript React application and include a react-select component i get a different error. But i believe they are related.
To Reproduce
create a React Typescript project
npx create-react-app my-app --template typescript
add dependency in package.json
"react-select": "5.7.0"
Add a react-select component anywhere in the project.
Delete .node_modules folder and run the following
Environment Info:
current version of create-react-app: 5.0.1
running from .npm/_npx/c67e74de0542c87c/node_modules/create-react-app
System:
OS: Linux 5.17 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-1260P
Binaries:
Node: 16.17.1 - ~/.nvm/versions/node/v16.17.1/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.17.1/bin/yarn
npm: 9.2.0 - ~/.nvm/versions/node/v16.17.1/bin/npm
Browsers:
Chrome: 108.0.5359.124
Firefox: 107.0.1
npmPackages:
react: 17.0.2 => 17.0.2
react-dom: 17.0.2 => 17.0.2
react-scripts: 1.0.0 => 1.0.0
npmGlobalPackages:
create-react-app: Not Found
The text was updated successfully, but these errors were encountered: