[nodemon] app crashed - waiting for file changes before starting...

来源:1-5 初始化项目

kyle0f

2019-12-16

切换到 projectName 这个目录,启动即可:

$ cd projectName
$ npm start
访问项目
如果启动没有任何异常的话,直接在浏览器访问 http://localhost:8080 即可看到效果了。

[!TIP]
使用 npx 命令,要求 npm 的版本 > 5.2.0,如果不会使用 npx 命令可以按下述方式进行安装

$ npm i es10-cli -g
$ es10-cli create projectName
$ cd projectName
$ npm start
如果项目安装失败,请手动下载模板并安装:

git clone https://github.com/cucygh/es-cli.git
cd es-cli
npm install
npm start

三个方法都试过了,1和2 安装失败,第三个显示‘[nodemon] app crashed - waiting for file changes before starting…
’就不动了。求救

写回答

1回答

kyle0f

提问者

2019-12-16

[nodemon] 1.19.0

[nodemon] to restart at any time, enter `rs`

[nodemon] watching: *.*

[nodemon] starting `npm run babel`


> koa2-es10@1.0.0 babel D:\es-cli

> babel-node app.js


Browserslist: caniuse-lite is outdated. Please run next command `npm update`

koa deprecated Support for generators will be removed in v3. See the documentation for examples of how to convert old middleware https://github.com/koajs/koa/blob/master/docs/migration.md app.js:39:5

server is listen, http://localhost:8080

(node:8048) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead

events.js:173

      throw er; // Unhandled 'error' event

      ^


Error: listen EADDRINUSE: address already in use :::8080

    at Server.setupListenHandle [as _listen2] (net.js:1226:14)

    at listenInCluster (net.js:1274:12)

    at Server.listen (net.js:1362:7)

    at Application.listen (D:\es-cli\node_modules\koa\lib\application.js:65:19)

    at Object.listen (D:\es-cli/app.js:34:5)

    at Module._compile (internal/modules/cjs/loader.js:759:30)

    at Module._compile (D:\es-cli\node_modules\pirates\lib\index.js:99:24)

    at Module._extensions..js (internal/modules/cjs/loader.js:770:10)

    at Object.newLoader [as .js] (D:\es-cli\node_modules\pirates\lib\index.js:104:7)

    at Module.load (internal/modules/cjs/loader.js:628:32)

Emitted 'error' event at:

    at emitErrorNT (net.js:1253:8)

    at processTicksAndRejections (internal/process/task_queues.js:84:9)

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! koa2-es10@1.0.0 babel: `babel-node app.js`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the koa2-es10@1.0.0 babel 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!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2019-12-16T13_37_50_817Z-debug.log

[nodemon] app crashed - waiting for file changes before starting...


0
0

再学JavaScript ES(6-10)全版本语法大全

前端无门槛学习,从ES6到ES10,一套课程掌握JS最新语法

1182 学习 · 336 问题

查看课程