gpt4 book ai didi

reactjs - 新的 create-react-app 构建上的 npm start 返回 ELIFECYCLE 错误

转载 作者:行者123 更新时间:2023-12-03 13:32:32 25 4
gpt4 key购买 nike

使用 create-react-app 制作了一个新的 React 应用程序,现在运行 npm start 时在终端中出现以下错误:

> react-scripts start

Attempting to bind to HOST environment variable: x86_64-apple-darwin13.4.0
If this was unintentional, check that you haven't mistakenly set it in your shell.


events.js:167
throw er; // Unhandled 'error' event
^

Error: getaddrinfo ENOTFOUND x86_64-apple-darwin13.4.0
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26)
Emitted 'error' event at:
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1468:12)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! aqi@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the aqi@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! /Users/chris/.npm/_logs/2018-12-24T10_07_46_970Z-debug.log

尝试删除节点模块文件夹和 npm install。

最佳答案

在终端中输入unset HOST。它会解决这个问题。

关于reactjs - 新的 create-react-app 构建上的 npm start 返回 ELIFECYCLE 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53912056/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com