Error: Cannot find module 'path-key' Require stack: - D:\RFS\ruyuan-dfs-master\ruyuan-dfs-namenode-fe\node_modules\cross-spawn\lib\util\resolveCommand.js - D:\RFS\ruyuan-dfs-master\ruyuan-dfs-namenode-fe\node_modules\cross-spawn\lib\parse.js - D:\RFS\ruyuan-dfs-master\ruyuan-dfs-namenode-fe\node_modules\cross-spawn\index.js - D:\RFS\ruyuan-dfs-master\ruyuan-dfs-namenode-fe\node_modules\react-dev-utils\crossSpawn.js - D:\RFS\ruyuan-dfs-master\ruyuan-dfs-namenode-fe\node_modules\react-scripts\bin\react-scripts.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15) at Function.Module._load (internal/modules/cjs/loader.js:730:27) at Module.require (internal/modules/cjs/loader.js:957:19) at require (internal/modules/cjs/helpers.js:88:18) at Object.<anonymous> (D:\RFS\ruyuan-dfs-master\ruyuan-dfs-namenode-fe\node_modules\cross-spawn\lib\util\resolveCommand.js:5:20) at Module._compile (internal/modules/cjs/loader.js:1068:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) at Module.load (internal/modules/cjs/loader.js:933:32) at Function.Module._load (internal/modules/cjs/loader.js:774:14) at Module.require (internal/modules/cjs/loader.js:957:19) { code: 'MODULE_NOT_FOUND', requireStack: [ 'D:\\RFS\\ruyuan-dfs-master\\ruyuan-dfs-namenode-fe\\node_modules\\cross-spawn\\lib\\util\\resolveCommand.js', 'D:\\RFS\\ruyuan-dfs-master\\ruyuan-dfs-namenode-fe\\node_modules\\cross-spawn\\lib\\parse.js', 'D:\\RFS\\ruyuan-dfs-master\\ruyuan-dfs-namenode-fe\\node_modules\\cross-spawn\\index.js', 'D:\\RFS\\ruyuan-dfs-master\\ruyuan-dfs-namenode-fe\\node_modules\\react-dev-utils\\crossSpawn.js', 'D:\\RFS\\ruyuan-dfs-master\\ruyuan-dfs-namenode-fe\\node_modules\\react-scripts\\bin\\react-scripts.js' ] }
时间: 2023-06-28 08:09:08 浏览: 288
报错记录 | Error: Cannot find module ‘react-dev-utils/crossSpawn’
5星 · 资源好评率100%
这是一个 Node.js 的错误,提示缺少 path-key 模块。你可以尝试重新安装依赖,或者手动安装 path-key 模块,命令如下:
```
npm install path-key
```
如果还是无法解决问题,可以尝试清除 npm 缓存,命令如下:
```
npm cache clean --force
```
然后再重新安装依赖。
阅读全文