Skip to content
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

Failed to compile after updating to v3.0.0 #6873

Closed
diegomolinavera opened this issue Apr 23, 2019 · 10 comments
Closed

Failed to compile after updating to v3.0.0 #6873

diegomolinavera opened this issue Apr 23, 2019 · 10 comments

Comments

@diegomolinavera
Copy link

After updating the next dependencies:

...
    "babel-preset-react-app":   "^7.0.2"  => "^8.0.0",
    "react-dev-utils": "^8.0.0" => "^9.0.0",
    "react-scripts": "^2.1.8" => "3.0.0",
...

I'm facing the next error using react lazy api:
Captura de pantalla de 2019-04-23 10-39-10

@dbenfouzari
Copy link

I also have a problem after updating "react-scripts": "3.0.0" :

Invalid Option: corejs is not a valid top-level option.
Maybe you meant to use 'targets'? (While processing: "/Volumes/Workspace/Personal/react-typescript/node_modules/babel-preset-react-app/index.js$0")

That's not the same error, but related to babel-preset-react-app too.

@codenamekt
Copy link

I was having the same problem. Removed yarn.lock and node_modules/ and did a fresh yarn install. This solved for me. Might give it a try.

@dbenfouzari
Copy link

That's exactly what I just did and it works ! But... I think it's not the good solution, but I may be wrong 😅.

Good luck for your problem !

@diegomolinavera
Copy link
Author

diegomolinavera commented Apr 23, 2019

oooh never thought about it. I mean I always remove the node_modules/ and the package-lock.json just in case, but didn't remove the yarn.lock. I did a rollback of everything to be able to work. I'll try later with that solutions guys; even if it is not the best solution but it might work like did for you. Thanks! :)

@kylehalleman
Copy link

Also encountering this problem. In one project I have rm -rf node_modules && npm install works (doesn't use package-lock.json) yet in another project that does use package-lock.json doing rm package-lock.json && rm -rf node_modules && npm install does not fix this issue. It's complaining about any places where I have dynamic imports (i.e. import()).

@donkeyote
Copy link

donkeyote commented Apr 24, 2019

We have hit this issue as well and it seemed to be related to a change in acorn-dynamic-import package.

image

image

We had to manually change our package-lock.json to get a build. Deleting the lock file didn't work for us either.
Could be linked to this webpack issue: webpack/webpack#8656
And maybe this one: acornjs/acorn#809

@kylehalleman
Copy link

@andybarsby looks like you found the issue! Changing the package-lock wasn't really an option in the failing project, so I installed acorn-dynamic-import@3 to devDependencies and ran a build and it worked. So 🤞this works when it heads up to the CI. Thanks for the tip.

@Anass-Daoudi
Copy link

I couldn't compile and start the app after I upgraded react-scripts to v3.0.1.
I've removed node_modules and installing them again and this have solved the problem for me.

@ianschmitz
Copy link
Contributor

Closing as a dupe of #6673.

@joglr
Copy link

joglr commented May 15, 2019

Thanks @kylehalleman and @andybarsby , this is the only solution that have worked for me! I've been having this issue since the 3.0 alpha/beta. I will try to suggest this as a fix in #6673

@lock lock bot locked and limited conversation to collaborators May 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants