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/package.json'

See original GitHub issue

Describe the bug When running storybook yarn storybook after upgrading to 4 I’m getting these errors:

Error: Cannot find module 'babel-loader/package.json'
at module.exports
at isBabelLoader8
at _default
at Object.babel
at accumulationPromise.then.newConfig
at process.internalTickCallback 
ERROR in ./.storybook/addons.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module 'babel-preset-react' from '/Users/path'
- If you want to resolve "react", use "module:react"
- Did you mean "@babel/react"?

System:

  • OS: MacOS
  • Device: Macbook Pro 2016
  • Framework: react
  • Version: 4.0.2

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:22 (5 by maintainers)

github_iconTop GitHub Comments

31reactions
igor-dvcommented, Nov 1, 2018

babel-loader is now a peer dep. Take a look at https://github.com/storybooks/storybook/blob/master/MIGRATION.md

27reactions
devdigitalcommented, May 15, 2019

This is still an issue, if you add babel-loader when using create-react-app, and it’s not the expected version, then you’ll receive the following:

There might be a problem with the project dependency tree.

It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

  "babel-loader": "8.0.5"

Don't try to install it manually: your package manager does it automatically.
However, a different version of babel-loader was detected higher up in the tree
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Cannot resolve module 'babel-loader' - Stack Overflow
I think the issue was that the Babel-loader node package wasn't installed properly or the executable couldn't be located by the application. All ......
Read more >
Cannot find module '@babel/core' error [Solved] | bobbyhadz
To solve the error "Cannot find module '@babel/core'", make sure to install the @babe/core package by opening your terminal in your project's root...
Read more >
babel-loader - npm
This package allows transpiling JavaScript files using Babel and webpack. Note: Issues with the output should be reported on the Babel Issues ...
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-loader - webpack
Disclaimer: babel-loader is a third-party package maintained by community members, it potentially does not have the same support, security policy or license as ......
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