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

[eject]: Cannot find module '@babel/plugin-transform-react-jsx-source' after ejecting #7353

Closed
pranshuchittora opened this issue Jul 11, 2019 · 2 comments

Comments

@pranshuchittora
Copy link

Describe the bug

After ejecting the CRA successfully, when I tried to start the dev server (yarn start) it threw an error.

Failed to compile.

./src/index.js
Error: [BABEL] /home/wasd/github/lol/src/index.js: Cannot find module '@babel/plugin-transform-react-jsx-source' (While processing: "/home/wasd/github/lol/node_modules/babel-preset-react-app/index.js$1")
    at Array.reduce (<anonymous>)

Did you try recovering your dependencies?

Yep, after removing the node_modules and reinstalling them fixes the issue.

Which terms did you search for in User Guide?

Not applicable

Environment

  System:
    OS: Linux 5.0 Ubuntu 19.04 (Disco Dingo)
    CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
  Binaries:
    Node: 10.12.0 - ~/.nvm/versions/node/v10.12.0/bin/node
    Yarn: 1.12.3 - /usr/bin/yarn
    npm: 6.10.0 - ~/.nvm/versions/node/v10.12.0/bin/npm
  Browsers:
    Chrome: 75.0.3770.100
    Firefox: 67.0.4
  npmPackages:
    react: ^16.8.6 => 16.8.6 
    react-dom: ^16.8.6 => 16.8.6 
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: 3.0.1

Steps to reproduce

  1. create-react-app <PRJ_NAME>
  2. cd PRJ_NAME
  3. yarn eject
  4. yarn start

Error

Failed to compile.

./src/index.js
Error: [BABEL] /home/wasd/github/lol/src/index.js: Cannot find module '@babel/plugin-transform-react-jsx-source' (While processing: "/home/wasd/github/lol/node_modules/babel-preset-react-app/index.js$1")
    at Array.reduce (<anonymous>)

Expected behavior

Should compile successfully. 👍

Actual behavior

Compilation failed due to lack of module.

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

@petetnt
Copy link
Contributor

petetnt commented Jul 11, 2019

Related to #6099

@iansu
Copy link
Contributor

iansu commented Jun 30, 2021

Duplicate of #6099

@iansu iansu marked this as a duplicate of #6099 Jun 30, 2021
@iansu iansu closed this as completed Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants