请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

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

切换到 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…
’就不动了。求救

正在回答 回答被采纳积分+3

1回答

提问者 kyle0f 2019-12-16 21:38:19

[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 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信