当前位置: 首页 > 工具软件 > React-Dev > 使用案例 >

报错记录 | Error: Cannot find module 'react-dev-utils/crossSpawn'

班言
2023-12-01

报错内容:

Error: Cannot find module 'react-dev-utils/crossSpawn'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (E:*******\node_modules\react-scripts\bin\react-scripts.js:18:15)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mobxtest@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mobxtest@0.1.0 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!     C:\Users\asus\AppData\Roaming\npm-cache\_logs\2019-11-03T07_14_00_900Z-debug.log

参考教程

Cannot find module ‘react-dev-utils/crossSpawn’ exception React App


解决办法

  • 删除 node_modules 文件夹
  • npm install

又活过来了 !

 类似资料: