首页 > 解决方案 > 使用 npm start 运行我的 jhipster 应用程序时出现错误

问题描述

我是 jhipster 的初学者,我有一些错误。我不知道为什么...使用 npm start 运行我的 jhipster 应用程序时出现错误。

$ npm start

    > agrosfer@0.0.0 start C:\Users\pc\Desktop\acumen_network\DEV0408181449
    > yarn run webpack:dev

    yarn run v1.7.0
    $ yarn run webpack-dev-server -- --config webpack/webpack.dev.js --progress --inline --hot --profile --port=9060 --watch-content-base
    warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the
    scripts.
    $ node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack/webpack.dev.js --progress --inline --hot --profile --port=9060 --watch-content-base
     10% building modules 3/3 modules 0 active[HPM] Proxy created: [ '/api',
      '/management',
      '/swagger-resources',
      '/v2/api-docs',
      '/h2-console',
      '/auth' ]  ->  http://127.0.0.1:8080
    events.js:183
          throw er; // Unhandled 'error' event
          ^

    Error: listen EADDRINUSE 127.0.0.1:9060
        at Object._errnoException (util.js:992:11)
        at _exceptionWithHostPort (util.js:1014:20)
        at Server.setupListenHandle [as _listen2] (net.js:1355:14)
        at listenInCluster (net.js:1396:12)
        at GetAddrInfoReqWrap.doListen [as callback] (net.js:1505:7)
        at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:97:10)
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    error Command failed with exit code 1.

标签: angularwebpackjhipsterwebpack-dev-serverjhipster-registry

解决方案


出现这个问题是因为进程的易碎结束,比如停止你的 jhipster 服务器。当您使用 Ctrl+C 关闭服务器时,有时您的服务器未成功关闭,因为您必须完全停止该进程并再次运行。

在cmd中运行以下命令:

  1. 网络统计-ano | 查找str 9000
  2. taskkill /PID 在这里输入你的PID /F

推荐阅读