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.

can't resolve module babel loader

See original GitHub issue
# package.json/scripts
"start": "HTTPS=true PORT=3001 react-app-rewired start && cra-append-sw --mode replace ./custom-sw.js"
"build": "react-app-rewired build && cra-append-sw ./src/append-sw.js",

$ yarn start #this works but doesn't do anything regarding the sw, I get CRA's noop SW
$ yarn build
ERROR in multi ./src/append-sw.js
Module not found: Error: Can't resolve 'babel-loader' in '/home/goldy/apps/veganprince/client'

Notice also the webpack hash error: image

if I remove the src from the destination in the build script, I get Module not found: Error: Can't resolve './append-sw.js' in '/home/goldy/apps/veganprince/client'

any ideas how to proceed?

Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
joaomantovanicommented, Apr 5, 2020

What this --skip-compile option does? It worked for me, but I’m a bit afraid in put this on my build

0reactions
whmountainscommented, Aug 22, 2019

An out-of-date react-scripts can also cause this problem.

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.
Read more >
Module not found: Can't resolve 'babel-loader' | bobbyhadz
To solve the error "Module not found: Error: Can't resolve 'babel-loader'", make sure to install the babel-loader package by opening your terminal in...
Read more >
Error: Cannot resolve module 'babel-loader' · Issue #1083
I'm using webpack in directory /users/path/a/(it holds the webpack.config.js) and compile files in directlry /another/path/b/.
Read more >
babel-loader - npm
babel module loader for webpack. Latest version: 9.1.0, ... Start using babel-loader in your project by running `npm i babel-loader`.
Read more >
babel-loader - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
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