【发布时间】:2018-12-27 00:21:33
【问题描述】:
当我运行 npm run dev -- -H 192.168.1.100 时出现此错误
{ Error: listen EADDRNOTAVAIL: address not available 192.168.1.100:3000
at Server.setupListenHandle [as _listen2] (net.js:1273:19)
at listenInCluster (net.js:1338:12)
at doListen (net.js:1471:7)
at process._tickCallback (internal/process/next_tick.js:63:19)
code: 'EADDRNOTAVAIL',
errno: 'EADDRNOTAVAIL',
syscall: 'listen',
address: '192.168.1.100',
port: 3000 }
这是package.json
{
"name": "Edel",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"next": "^7.0.2",
"react": "^16.7.0",
"react-dom": "^16.7.0"
}
}
【问题讨论】: