jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.25k stars 4k forks source link

Node throw er; after npm start #26031

Closed Ahrovan closed 2 weeks ago

Ahrovan commented 2 weeks ago

Always show node:events:496 throw er; // Unhandled 'error' event ^ after run npm start.

System:

  1. First run ./mvnw and result:

    Application 'App' is running! Access URLs:
    Local:          http://localhost:8080/
    External:       http://xxx.xxx.xxx.xxx:8080/
    Profile(s):     [dev, api-docs]

  1. then run npm start and result:

Compiled successfully. [ Browsersync ] Proxying: http://localhost:4200 [ Browsersync ] Access URLs:

   Local: http://localhost:9000
External: http://xxx.xxx.xxx.xxx:9000

      UI: http://localhost:3001

UI External: http://xxx.xxx.xxx.xxx:3001

node:events:496 throw er; // Unhandled 'error' event ^

Error: listen EACCES: permission denied 0.0.0.0:3001 at Server.setupListenHandle [as _listen2] (node:net:1880:21) at listenInCluster (node:net:1945:12) at Server.listen (node:net:2037:7) at Object.startServer [as fn] (...\node_modules\browser-sync-ui\lib\async.js:123:39) at ...\node_modules\browser-sync-ui\lib\UI.js:185:14 at iterate (...\node_modules\async-each-series\index.js:8:5) at ...\node_modules\async-each-series\index.js:16:16 at ...\node_modules\browser-sync-ui\lib\UI.js:193:13 at Object.setUrlOptions [as fn] (...\node_modules\browser-sync-ui\lib\async.js:76:9) at ...\node_modules\browser-sync-ui\lib\UI.js:185:14 at iterate (...\node_modules\async-each-series\index.js:8:5) at ...\node_modules\async-each-series\index.js:16:16 at ...\node_modules\browser-sync-ui\lib\UI.js:193:13 at Object.setBsOptions [as fn] (...\node_modules\browser-sync-ui\lib\async.js:48:9) at ...\node_modules\browser-sync-ui\lib\UI.js:185:14 at iterate (...\node_modules\async-each-series\index.js:8:5) at ...\node_modules\async-each-series\index.js:16:16 at ...\node_modules\browser-sync-ui\lib\UI.js:193:13 at ...\node_modules\browser-sync-ui\lib\async.js:20:13 at ...\node_modules\portscanner\lib\portscanner.js:230:7 at ...\node_modules\portscanner\node_modules\async\dist\async.js:972:16 at next (...\node_modules\portscanner\node_modules\async\dist\async.js:5228:18) at ...\node_modules\portscanner\lib\portscanner.js:216:9 at Socket. (...\node_modules\portscanner\lib\portscanner.js:132:5) at Socket.emit (node:events:518:28) at TCP. (node:net:337:12) Emitted 'error' event on Server instance at: at emitErrorNT (node:net:1924:8) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { code: 'EACCES', errno: -4092, syscall: 'listen', address: '0.0.0.0', port: 3001 }

Node.js v20.12.2

mraible commented 2 weeks ago

The error message seems to indicate you already have something running in port 3001 or you don't have permission to run anything on that port.

Ahrovan commented 2 weeks ago

@mraible here https://www.jhipster.tech/using-angular/

4.Now run ./mvnw or ./gradlew to launch the application server and it should be available at localhost:8080 this also serves the client side code compiled from the above steps. 5. Now run npm start in a new terminal to launch Webpack dev-server with BrowserSync. This will take care of compiling your TypeScript code, and automatically reloading your browser.

but in step 5, always i see error. now can not automatically reloading browser for Development.

Ahrovan commented 2 weeks ago

solved net stop winnat net start winnat