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.

Found an unhandled loader in the developement webpack config: .../node_modules/style-loader/index.js

See original GitHub issue


I get a upgrade craco-less error but even though I updgrade it doesn’t change anything. It is weird because it was working yesterday and I have not made any major changes since yesterday it just started throwing this error.

I’m using latest version of craco and craco-less:

"@craco/craco": "^5.7.0",
"craco-less": "^1.17.0",


(node:11523) UnhandledPromiseRejectionWarning: Error: Found an unhandled loader in the developement webpack config: node_modules/style-loader/index.js

This error probably occurred because you updated react-scripts or craco. Please try updating craco-less to the latest version:

   $ yarn upgrade craco-less


   $ npm update craco-less

If that doesn't work, craco-less needs to be fixed to support the latest version.
Please check to see if there's already an issue in the FormAPI/craco-less repo:


If not, please open an issue and we'll take a look. (Or you can send a PR!)

You might also want to look for related issues in the craco and create-react-app repos:


    at throwUnexpectedConfigError (.../node_modules/@craco/craco/lib/plugin-utils.js:29:11)
    at throwError (.../node_modules/craco-less/lib/craco-less.js:14:5)
    at .../node_modules/craco-less/lib/craco-less.js:119:7
    at Array.forEach (<anonymous>)
    at Object.overrideWebpackConfig (.../node_modules/craco-less/lib/craco-less.js:51:11)
    at overrideWebpack (.../node_modules/@craco/craco/lib/features/plugins.js:42:40)
    at .../node_modules/@craco/craco/lib/features/plugins.js:64:29
    at Array.forEach (<anonymous>)
    at applyWebpackConfigPlugins (.../node_modules/@craco/craco/lib/features/plugins.js:63:29)
    at mergeWebpackConfig (.../node_modules/@craco/craco/lib/features/webpack/merge-webpack-config.js:67:30)
(node:11523) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see (rejection id: 1)
(node:11523) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

sadsacommented, Oct 22, 2020

@cosydney - I also experienced a similar issue today. Can you confirm what your NodeJS NODE_ENV variable is? When I set mine to production, I saw this error, but when I set it back to development, the issue disappeared.

You should be able to see this by typing node in the command prompt which will open the node shell and then type process.env.NODE_ENV.

russelldccommented, Mar 30, 2021

On the latest version of react-scripts, craco and craco-less, it seems like production builds are silently failing to compile less files.

Running with craco start will add our index.less to the app, but craco build does not.

Running craco start with NODE_ENV set to production highlights what I think might be the real issue?

The same exact behavior is also happening when I tried downgrading to: react-scripts@^3.2.0: 3.4.4 @craco/craco@^5.5.0: 5.9.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack-cli failed to load webpack.config.js and couldn't ...
I use Linux. i think this part is causing the error in your configuration: "dev": "webpack --mode development", ...
Read more >
Top 5 @craco/craco Code Examples
Learn more about how to use @craco/craco, based on @craco/craco code examples created from the most popular ways it is used in public...
Read more >
New York City Atlas Search Restaurant Finder Tutorial ...
... getting craco: *** Cannot find ESLint loader (eslint-loader) ... /craco/lib/features/webpack/style/style.js:9:25) at mergeWebpackConfig ...
Read more >
@craco/craco - npm
config.js:23 throw new Error( ^ Error: Can't find eslint-loader in the webpack config! This ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found