其他分享
首页 > 其他分享> > vue启动报错getaddrinfo ENOTFOUND x86_64-apple-darwin13.4.0

vue启动报错getaddrinfo ENOTFOUND x86_64-apple-darwin13.4.0

作者:互联网

报错信息如下:

 npm run start

> vocalprint@1.0.0 start /Users/mengzhichao/Desktop/cc/4pd/ie
> npm run dev


> vocalprint@1.0.0 dev /Users/mengzhichao/Desktop/cc/4pd/ie
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

 10% building modules 1/1 modules 0 activeevents.js:377                            
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOTFOUND x86_64-apple-darwin13.4.0
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:26)
Emitted 'error' event on Server instance at:
    at GetAddrInfoReqWrap.doListen [as callback] (net.js:1502:12)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:17) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'x86_64-apple-darwin13.4.0'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vocalprint@1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the vocalprint@1.0.0 dev 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/mengzhichao/.npm/_logs/2022-03-18T08_58_27_001Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vocalprint@1.0.0 start: `npm run dev`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the vocalprint@1.0.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/mengzhichao/.npm/_logs/2022-03-18T08

!!!重点报错信息在这!!!

Error: getaddrinfo ENOTFOUND x86_64-apple-darwin13.4.0
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:26)

解决方案1:

在/etc/hosts里面添加
sudo vi /etc/hosts

127.0.0.1 x86_64-apple-darwin13.4.0

npm run start 启动成功
在这里插入图片描述

解决方案2

在当前命令行窗口执行

unset HOST
npm run start

即可成功!!!
在这里插入图片描述

标签:npm,getaddrinfo,vue,run,ERR,--,dev,js,报错
来源: https://blog.csdn.net/true1cc/article/details/123579970