npm在新的create-react-app构建上启动,返回ELIFECYCLE错误 [英] npm start on new create-react-app build returns ELIFECYCLE error

查看:317
本文介绍了npm在新的create-react-app构建上启动,返回ELIFECYCLE错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Made a new react app using create-react-app and now getting the following error in the terminal when running 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.

Tried removing the node-module folder and npm install.

推荐答案

在终端中键入unset HOST.它将解决问题.

type unset HOST in the terminal. It will solve the issue.

这篇关于npm在新的create-react-app构建上启动,返回ELIFECYCLE错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆