Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node throw er; after npm start #26031

Closed
Ahrovan opened this issue May 3, 2024 · 3 comments
Closed

Node throw er; after npm start #26031

Ahrovan opened this issue May 3, 2024 · 3 comments

Comments

@Ahrovan
Copy link

Ahrovan commented May 3, 2024

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

System:

  • JHipster release v8.4.0
  • java --version
    openjdk 21.0.3 2024-04-16 LTS
    OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS)
    OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)
  • node --version
    v20.12.2
  • Windows 11
  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
Copy link
Contributor

mraible commented May 3, 2024 via email

@Ahrovan
Copy link
Author

Ahrovan commented May 3, 2024

@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
Copy link
Author

Ahrovan commented May 3, 2024

solved
net stop winnat
net start winnat

@Ahrovan Ahrovan closed this as completed May 3, 2024
@mraible mraible added this to the 8.5.0 milestone May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants