我使用 npx
npx create-react-app react-authentication
在那之后当我跑
npm start
它抛出一个错误说:
internal/modules/cjs/loader.js:456
throw e;
^
Error: Cannot find module '/home/astraCreateDataProperty/react-authentication/node_modules/es-abstract/2020/CreateDataProperty.js'
at createEsmNotFoundErr (internal/modules/cjs/loader.js:929:15)
at finalizeEsmResolution (internal/modules/cjs/loader.js:922:15)
at resolveExports (internal/modules/cjs/loader.js:450:14)
at Function.Module._findPath (internal/modules/cjs/loader.js:490:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/home/astra*/react-authentication/node_modules/object.getownpropertydescriptors/implementation.js:3:26)
at Module._compile (internal/modules/cjs/loader.js:1085:14) {
code: 'MODULE_NOT_FOUND',
path: '/home/astra*/react-authentication/node_modules/es-abstract/package.json'
}
我尝试了一些方法来解决这个问题
rm -rf node_modules
rm -rf package-lock.json
npm cache clean --force
npm install
但是,同样的错误仍然存在。这个错误的原因是什么?