question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module 'babel-loader' after eject

See original GitHub issue

Is this a bug report?

Yes

Environment

OS: Mac os X 10.13.4 Node: v10.1.0/v9.11.1 yarn: v1.6.0 create-react-app: v1.5.2 react-scripts: v1.1.4

Description:

After running create-react-app my-app, yarn start works just fine. However after running yarn run eject and type yarn start again, the issue pumps out below:

yarn run v1.6.0
$ node scripts/start.js
internal/modules/cjs/loader.js:550
    throw err;
    ^

Error: Cannot find module 'babel-loader'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
    at Function.resolve (internal/modules/cjs/helpers.js:18:19)
    at Object.<anonymous> (/Users/norn/Desktop/my-app-9/config/webpack.config.dev.js:145:29)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)
    at Object.<anonymous> (/Users/norn/Desktop/my-app-9/scripts/start.js:31:16)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

2018-05-10 5 04 05

Also, react-app-rewired directly fails when use command yarn start, due to the same issue described above.


Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

27reactions
daresamcommented, May 11, 2018

A simple fix to that just install ‘babel-loader’ again by typing yarn add babel-loader on your terminal

5reactions
mrezabidhendicommented, Jul 10, 2018

I’ve just faced the exact same issue but I’m using npm as my package manager. update: I installed yarn and I’m still having the issue there. Although It can be solved by installing ‘babel-loader’ manually

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module 'babel-loader' Require stack
I'm running this react app and then I ran npm eject to eject the app so I can add the web packs features....
Read more >
Fix the Cannot find module '@babel/core' error - Reactgo
First, remove the node_modules folder, package-lock.json file present inside your project directory by using the below command. rm-rf ...
Read more >
babel/preset-env
babel /preset-env` is a smart preset that allows you to use the latest JavaScript without needing to micromanage which syntax transforms (and optionally, ......
Read more >
react-hot-loader - npm
Place it after babel-loader, if babel-loader is present. // webpack.config.js module.exports = { module: ...
Read more >
internal modules cjs loader error - You.com | The AI Search ...
You need to install express as the error is showing that express is missing. The command for that shall be npm install express...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found