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.

[Bug]Error: Cannot find module './node_modules/react-scripts/config/webpack.config.dev' with react-script v2.1.2

See original GitHub issue

Cannot find webpack config with react-scripts 2.1.2

I have updated my react-scripts dependencies from 2.1.1 to 2.1.2 and got the following error on both npm start and npm run build:

Error: Cannot find module /node_modules/react-scripts/config/webpack.config.dev'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
    at Function.resolve (internal/modules/cjs/helpers.js:32:19)
    at resolveConfigFilePath (/node_modules/@craco/craco/lib/cra.js:7:20)
    at getWebpackDevConfigPath (/node_modules/@craco/craco/lib/cra.js:25:12)
    at loadWebpackDevConfig (/node_modules/@craco/craco/lib/cra.js:29:22)
    at Object.<anonymous> (/node_modules/@craco/craco/scripts/start.js:18:26)
    at Module._compile (internal/modules/cjs/loader.js:722:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)

Expect

to start or build my unjected create-react-app.

Result

Can’t find the configuration react-scripts/config/webpack.config.dev

Seems obvious: https://github.com/facebook/create-react-app/tree/v2.1.2/packages/react-scripts/config

Version

  • Craco: 3.2.3

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:39
  • Comments:29 (3 by maintainers)

github_iconTop GitHub Comments

13reactions
patricklafrancecommented, Jan 17, 2019

Fix with https://www.npmjs.com/package/@craco/craco/v/3.3.1

Sorry for the very long delay.

12reactions
patricklafrancecommented, Jan 17, 2019

Hi,

Sorry for the delay, I had an accident and couldn’t use a computer for a few weeks.

I’ll make sure https://github.com/sharegate/craco/pull/62 is merged and release soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find webpack config with react-scripts 2.1.2 - GitHub
[Bug]Error: Cannot find module './node_modules/react-scripts/config/webpack.config.dev' with react-script v2.1.2 #61.
Read more >
Error: Cannot find module react when trying to run npm start
I am running into a bug when trying to run 'npm start' for a react app. My app had been running mostly as...
Read more >
Cannot find module 'react' Error in TypeScript | bobbyhadz
To solve the "Cannot find module `react` or its corresponding type declarations" error, install the module and its type definitions by running the...
Read more >
Solved: Cannot find module react : npm install - YouTube
start Windows PowerShell and use npm install.
Read more >
react-app-rewired - npm
Tweak the create-react-app webpack config(s) without using 'eject' and without creating a fork of the react-scripts. Latest version: 2.2.1, ...
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