【发布时间】:2022-03-10 05:26:10
【问题描述】:
我安装了 react 但现在当我尝试启动时它给了我这个错误:
$ npm start
> cred@0.1.0 start
> react-scripts start
The system cannot find the path specified.
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'D:\react-scripts\bin\react-scripts.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
【问题讨论】:
-
确保您的项目中有
node_modules文件夹。如果没有,您可以执行npm install或yarn& 然后尝试运行您的项目。 -
找到解决方案了吗?
-
@Cyebukayire 是的,我找到了解决方案,我在 d 驱动器文件夹中使用了 react-app,但是当我将它安装在 c 用户驱动器中时,错误消失了
标签: reactjs npm error-handling