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

报错内容:
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

又活过来了 !

出现错误 "internal/modules/cjs/loader:936 throw err; ^ Error: Cannot find module 'react-dev-utils/crossSpawn'" 是由于无法找到模块 'react-dev-utils/crossSpawn' 引发的。 这可能是因为在项目中使用了该模块,但你的环境中没有安装该模块导致的。要解决这个问题,你可以尝试以下几个步骤: 1. 首先,确保你的项目中的 package.json 文件中包含了 'react-dev-utils/crossSpawn' 模块的依赖。可以通过在项目根目录下运行 `npm install react-dev-utils` 命令来安装该模块并更新 package.json 文件。 2. 如果安装依赖后仍然出现错误,可能是由于缓存问题导致的。你可以尝试清除 npm 缓存并重新安装依赖。运行 `npm cache clean --force` 命令清除缓存,然后再次运行 `npm install` 命令重新安装依赖。 3. 如果以上方法都没有解决问题,可能是由于项目中的其他配置或依赖引起的冲突。你可以尝试更新项目中的相关依赖版本,或者检查项目配置文件是否正确设置。 通过以上步骤,你应该能够解决 "Cannot find module 'react-dev-utils/crossSpawn'" 错误,并继续进行你的开发工作。如果问题仍然存在,请检查你的环境是否完全符合项目的要求,并参考相关文档或寻求开发社区的帮助来解决问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [启动 fabric 区块链rest接口过程中的问题 runApp.sh Cannot find module ‘fabric-client’](https://download.csdn.net/download/weixin_38688745/14043233)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [node:internal/modules/cjs/loader:936 throw err;求解决](https://blog.csdn.net/qq_51775524/article/details/124848264)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值