关于react项目npm start 报错

164 阅读1分钟

报错信息为module_not_found

Error: Cannot find module 'C:\Users\jahmar lawrence\Desktop\webmyapp\theapp\index.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! theapp@0.1.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the theapp@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\jahmar lawrence\AppData\Roaming\npm-cache\_logs\2020-11-22T07_28_07_211Z-debug.log

解决方式: 更新node版本为新版本

vue和react都是单页面富应用类型的框架。