Skip to content

Failed to compile after updating to v3.0.0 #6873

Closed

Description

@diegomolinavera

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

Activity

  1. dbenfouzari commented on Apr 23, 2019

    @dbenfouzari

    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.

  2. codenamekt commented on Apr 23, 2019

    @codenamekt

    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.

  3. dbenfouzari commented on Apr 23, 2019

    @dbenfouzari

    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 !

  4. diegomolinavera commented on Apr 23, 2019

    @diegomolinavera
    Author

    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! :)

  5. kylehalleman commented on Apr 23, 2019

    @kylehalleman

    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()).

  6. donkeyote commented on Apr 24, 2019

    @donkeyote

    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

  7. kylehalleman commented on Apr 24, 2019

    @kylehalleman

    @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.

  8. Anass-Daoudi commented on May 11, 2019

    @Anass-Daoudi

    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.

  9. ianschmitz commented on May 11, 2019

    @ianschmitz
    Contributor

    Closing as a dupe of #6673.

  10. nimrossum commented on May 15, 2019

    @nimrossum

    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

  11. locked and limited conversation to collaborators on May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions