无法打开我的开发服务器 (localhost:3000)
Cannot open my development server (localhost:3000)
我刚刚在桌面上做了我的第一个 React 应用程序,当我打开我的 React 应用程序并点击
时,我为 slowness.after 清理了我的电脑
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! try@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the try@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`enter code here` found in:
npm ERR! C:\Users\Azran\AppData\Roaming\npm-cache\_logs18-09-13T18_11_38_805Z-debug.log
然后,再次安装 npm 模块
npm install
或者,如果你使用纱线:
yarn install
//or, just
yarn
那么,你应该可以正常启动项目了:
npm start
// or,
yarn start
删除节点模块文件夹,然后运行
npm install
我刚刚在桌面上做了我的第一个 React 应用程序,当我打开我的 React 应用程序并点击
时,我为 slowness.after 清理了我的电脑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! try@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the try@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`enter code here` found in:
npm ERR! C:\Users\Azran\AppData\Roaming\npm-cache\_logs18-09-13T18_11_38_805Z-debug.log
然后,再次安装 npm 模块
npm install
或者,如果你使用纱线:
yarn install
//or, just
yarn
那么,你应该可以正常启动项目了:
npm start
// or,
yarn start
删除节点模块文件夹,然后运行
npm install