无法打开我的开发服务器(localhost:3000)

问题描述 投票:0回答:2

我只是在桌面上做了​​我的第一个反应应用程序,我清理我的电脑慢了。之后我打开我的反应应用程序并点击

npm start - >弹出这个错误

module.js:549
throw err;
^

Error: Cannot find module './lib/compat'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\Azran\Desktop\try\node_modules\raw-body\node_modules\depd\index.js:11:24)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `react-scripts 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`enter code here` found in:
npm ERR!     C:\Users\Azran\AppData\Roaming\npm-cache\_logs\2018-09-13T18_11_38_805Z-debug.log
node.js reactjs npm webpack-dev-server
2个回答
0
投票

然后,再次安装npm模块

npm install

或者,如果你使用纱线:

yarn install
//or, just
yarn

然后,您应该能够正常启动项目:

npm start

// or,
yarn start

0
投票

删除node-modules文件夹,然后运行

npm install
© www.soinside.com 2019 - 2024. All rights reserved.