NPM start 在 package.json 中导致来自 "gulp clean && gulp frontend && gulp dev" 的无法解释的错误
NPM start causes unexplained error from "gulp clean && gulp frontend && gulp dev" in package.json
我遵循这个 Tutorial 直到我到达 前端任务 步骤,这就是 运行 NPM 和 npm start 给我以下错误:
我发现问题是我在 package.json 中更改的这段代码:
package.json: “start”: “gulp clean && gulp frontend && gulp dev”, “build”: “gulp clean && gulp
或我对上述教程的 前端 部分之后的 gulpfile.js 所做的更改:
注意:我安装了最新的 Node 和 NPM。
错误代码:
$ npm start
> my-vzlr@0.0.0 start C:\my-vzlr
> gulp clean && gulp frontend && gulp dev
[11:00:58] Using gulpfile C:\my-vzlr\gulpfile.js
[11:00:58] Starting 'clean'...
[11:00:58] Finished 'clean' after 18 ms
[11:00:59] Using gulpfile C:\my-vzlr\gulpfile.js
[11:00:59] Starting 'frontend:dependencies'...
[11:00:59] Starting 'frontend:js'...
[11:00:59] Starting 'frontend:html'...
[11:00:59] Starting 'frontend:css'...
[11:00:59] Finished 'frontend:css' after 17 ms
[11:00:59] Finished 'frontend:html' after 81 ms
[11:00:59] Finished 'frontend:js' after 94 ms
[11:00:59] Finished 'frontend:dependencies' after 117 ms
[11:00:59] Starting 'frontend'...
[11:00:59] Finished 'frontend' after 4.53 µs
[11:01:00] Using gulpfile C:\my-vzlr\gulpfile.js
[11:01:00] Starting 'dev:watch'...
[11:01:00] Finished 'dev:watch' after 17 ms
[11:01:00] Starting 'dev:serve'...
[11:01:00] Webserver started at http://localhost:8000
[11:01:00] Finished 'dev:serve' after 13 ms
[11:01:00] Starting 'dev'...
[11:01:00] Finished 'dev' after 18 µs
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 127.0.0.1:8000
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1253:14)
at listen (net.js:1289:10)
at net.js:1399:9
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:65:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:84:10)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Godsnake\AppDat
a\Roaming\npm\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v6.4.0
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! my-vzlr@0.0.0 start: `gulp clean && gulp frontend && gulp dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-vzlr@0.0.0 start script 'gulp clean && gulp frontend &
& gulp dev'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the my-vzlr package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp clean && gulp frontend && gulp dev
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs my-vzlr
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls my-vzlr
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\my-vzlr\npm-debug.log
EADDRINUSE 错误意味着您尝试侦听的端口已被使用。停止正在使用它的应用程序或选择不同的端口号。
Error: listen EADDRINUSE 127.0.0.1:8000
表示您尝试使用的端口(此处为 :8000)已占线。您是否还有以前的应用程序实例 运行 ?如果是,则将其杀死并重试。当然,请尝试查看该端口上是否有其他服务 运行 并停止它。
我遵循这个 Tutorial 直到我到达 前端任务 步骤,这就是 运行 NPM 和 npm start 给我以下错误:
我发现问题是我在 package.json 中更改的这段代码:
package.json: “start”: “gulp clean && gulp frontend && gulp dev”, “build”: “gulp clean && gulp
或我对上述教程的 前端 部分之后的 gulpfile.js 所做的更改: 注意:我安装了最新的 Node 和 NPM。
错误代码:
$ npm start
> my-vzlr@0.0.0 start C:\my-vzlr
> gulp clean && gulp frontend && gulp dev
[11:00:58] Using gulpfile C:\my-vzlr\gulpfile.js
[11:00:58] Starting 'clean'...
[11:00:58] Finished 'clean' after 18 ms
[11:00:59] Using gulpfile C:\my-vzlr\gulpfile.js
[11:00:59] Starting 'frontend:dependencies'...
[11:00:59] Starting 'frontend:js'...
[11:00:59] Starting 'frontend:html'...
[11:00:59] Starting 'frontend:css'...
[11:00:59] Finished 'frontend:css' after 17 ms
[11:00:59] Finished 'frontend:html' after 81 ms
[11:00:59] Finished 'frontend:js' after 94 ms
[11:00:59] Finished 'frontend:dependencies' after 117 ms
[11:00:59] Starting 'frontend'...
[11:00:59] Finished 'frontend' after 4.53 µs
[11:01:00] Using gulpfile C:\my-vzlr\gulpfile.js
[11:01:00] Starting 'dev:watch'...
[11:01:00] Finished 'dev:watch' after 17 ms
[11:01:00] Starting 'dev:serve'...
[11:01:00] Webserver started at http://localhost:8000
[11:01:00] Finished 'dev:serve' after 13 ms
[11:01:00] Starting 'dev'...
[11:01:00] Finished 'dev' after 18 µs
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 127.0.0.1:8000
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1253:14)
at listen (net.js:1289:10)
at net.js:1399:9
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:65:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:84:10)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Godsnake\AppDat
a\Roaming\npm\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v6.4.0
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! my-vzlr@0.0.0 start: `gulp clean && gulp frontend && gulp dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-vzlr@0.0.0 start script 'gulp clean && gulp frontend &
& gulp dev'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the my-vzlr package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp clean && gulp frontend && gulp dev
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs my-vzlr
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls my-vzlr
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\my-vzlr\npm-debug.log
EADDRINUSE 错误意味着您尝试侦听的端口已被使用。停止正在使用它的应用程序或选择不同的端口号。
Error: listen EADDRINUSE 127.0.0.1:8000
表示您尝试使用的端口(此处为 :8000)已占线。您是否还有以前的应用程序实例 运行 ?如果是,则将其杀死并重试。当然,请尝试查看该端口上是否有其他服务 运行 并停止它。