create-react-app-typescript icon indicating copy to clipboard operation
create-react-app-typescript copied to clipboard

Error: Cannot find module 'react-dev-utils/workspaceUtils'

Open KDCinfo opened this issue 7 years ago • 8 comments

Hi there,

Having recently upgrading to [email protected] due to an npm audit which recommended the upgrade, I now get a Cannot find module error when trying to start the server. Testing won't run either.

Audit Results:

Run npm install [email protected] to resolve 80 vulnerabilities

Starting Server:

uuser@ubuntu1:/var/www/html/expired-to-be$ BROWSER=none HTTPS=true npm start

> [email protected] start /var/www/html/expired-to-be
> react-scripts-ts start

module.js:559
    throw err;
    ^

Error: Cannot find module 'react-dev-utils/workspaceUtils'
    at Function.Module._resolveFilename (module.js:557:15)
    at Function.Module._load (module.js:484:25)
    at Module.require (module.js:606:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/var/www/html/expired-to-be/node_modules/react-scripts-ts/config/paths.js:14:22)
    at Module._compile (module.js:662:30)
    at Object.Module._extensions..js (module.js:673:10)
    at Module.load (module.js:575:32)
    at tryModuleLoad (module.js:515:12)
    at Function.Module._load (module.js:507:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `react-scripts-ts start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/uuser/.npm/_logs/2018-05-11T10_22_00_007Z-debug.log
  1. npm ls react-scripts-ts (if you haven’t ejected): 3.0.0

  2. node -v: 9.7.1

  3. npm -v: 6.0.1

  4. Operating system: Ubuntu 16.04 x64

I've looked everywhere for a solution to this. I've gone through all the npm up && npm i and npm i --save-dev react-dev-utils, but can't seem to find any way to get past this error.

Thoughts?

Thanks!

KDCinfo avatar May 11 '18 10:05 KDCinfo

To remove this as a blocker, I downgraded back to "react-scripts-ts": "2.15.1" (alongside "typescript": "^2.8.3"). The 80 vulnerabilities that were previously prevalent did not return, and the 9 that remained did not trigger GitHub's vulnerability alert.

KDCinfo avatar May 11 '18 19:05 KDCinfo

I installed the older version 4.x.x of react-dev-utils manually to resolve the error.

tpetrina avatar May 30 '18 06:05 tpetrina

Same problem here. I found that upgrading "react-scripts-ts" to 2.16.0 cleared up the audit warnings and didn't produce this error.

kevintighe avatar Jun 12 '18 13:06 kevintighe

Same issue here, 3.0.0 is broken.

Nufflee avatar Jun 14 '18 17:06 Nufflee

Downgrading react-dev-utils didn't help. Really need 3.0.0 because older versions of jest has bugs.

CodeJjang avatar Jun 26 '18 08:06 CodeJjang

Same thing still here. Any news about this?

mattes3 avatar Sep 27 '18 11:09 mattes3

Getting the same thing, hoping for an update soon...

ryee-dev avatar Sep 27 '18 17:09 ryee-dev

See this note about this package: https://github.com/facebook/create-react-app/issues/5437

speedy250 avatar Oct 16 '18 05:10 speedy250