无法读取未定义npm ERR的属性“ map”!代码ELIFECYCLE npm ERR! errno 1 fir React前端/轨道后端

我在运行npm start时收到此错误消息:

Cannot read property 'map' of undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! quote-react-redux@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the quote-react-redux@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

任何人都知道发生了什么事吗?还是有任何文档可以读取npm错误日志?

fangjin16 回答:无法读取未定义npm ERR的属性“ map”!代码ELIFECYCLE npm ERR! errno 1 fir React前端/轨道后端

我也遇到了类似的错误。复制我的一个:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gatsby-starter-default@0.1.0 develop: `gatsby develop`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the gatsby-starter-default@0.1.0 develop script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

当我运行的node版本与我用来生成应用程序的版本不同,或者可能是从其他地方克隆而忘记运行npm install时,会发生问题。

修复1:将节点版本更改为试图通过节点版本管理器启动服务器的目录中与应用程序生成时使用的版本相同的版本。

修复2:确保在要使用的目录中设置了要运行的节点版本,然后在npm install中进行了设置。您可能需要在新的git分支中执行此操作,直到使其运行,然后合并到master中,因为有时版本确实有所不同,您可能需要手动安装其他软件包(它们会列出)。

修复3:清除并从头开始(可能比修复2更好)。试试:

npm cache clean --force
rm package-lock.json
/bin/rm -rf node_modules/
npm install
本文链接:https://www.f2er.com/3093137.html

大家都在问