question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: listen EACCES: permission denied 0.0.0.0:3000

See original GitHub issue

node 11.11 npm 6.9.0 windows 10

I get the error no matter which build system I use, gulp or laravel-mix.

events.js:173
      throw er; // Unhandled 'error' event
      ^

Error: listen EACCES: permission denied 0.0.0.0:3000
    at Server.setupListenHandle [as _listen2] (net.js:1239:19)
    at listenInCluster (net.js:1304:12)
    at Server.listen (net.js:1392:7)
    at module.exports.plugin (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\server\index.js:27:25)
    at Object.startServer [as fn] (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\async.js:177:52)
    at C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\browser-sync.js:120:14
    at iterate (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\utils.js:269:9)
    at C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\utils.js:281:21
    at executeTask (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\browser-sync.js:136:13)
    at Object.mergeMiddlewares [as fn] (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\async.js:166:9)
    at C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\browser-sync.js:120:14
    at iterate (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\utils.js:269:9)
    at C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\utils.js:281:21
    at executeTask (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\browser-sync.js:136:13)
    at Object.setFileWatchers [as fn] (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\async.js:155:9)
    at C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\browser-sync.js:120:14
    at iterate (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\utils.js:269:9)
    at C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\utils.js:281:21
    at executeTask (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\browser-sync.js:136:13)
    at Object.setInternalEvents [as fn] (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\async.js:148:9)
    at C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\browser-sync.js:120:14
    at iterate (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\utils.js:269:9)
    at C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\utils.js:281:21
    at executeTask (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\browser-sync.js:136:13)
    at Object.setOptions [as fn] (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\async.js:133:9)
    at C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\browser-sync.js:120:14
    at iterate (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\utils.js:269:9)
    at C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\utils.js:281:21
    at executeTask (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\browser-sync.js:136:13)
    at Object.resolveInlineUserPlugins [as fn] (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\async.js:125:9)
    at C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\browser-sync.js:120:14
    at iterate (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\utils.js:269:9)
    at C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\utils.js:281:21
    at executeTask (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\browser-sync.js:136:13)
    at QueryReqWrap.callback (C:\Users\$USER\Sites\my-site\wp-content\themes\my-site\node_modules\browser-sync\dist\async.js:92:17)
    at QueryReqWrap.onresolve [as oncomplete] (dns.js:201:10)
Emitted 'error' event at:
    at emitErrorNT (net.js:1283:8)
    at processTicksAndRejections (internal/process/next_tick.js:76:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-site@1.0.0 watch: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-site@1.0.0 watch 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\$USER\AppData\Roaming\npm-cache\_logs\2019-03-08T08_41_02_106Z-debug.log

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:13

github_iconTop GitHub Comments

84reactions
ialirezaeicommented, Dec 5, 2021

i have same problem in windows 10 and this help me. there is cases where nothing is running on the port but some applications or even your code can not run the fix to this is in this order:

1 - Open PowerShell as Admin.

2 - stop winnat with command below:

$ net stop winnat

3 - start winnat again with command below:

$ net start winnat

74reactions
bonovskicommented, Mar 15, 2019

If anyone else is having a similar problem on windows. The issue is the virtual ethernet adapter created by docker. Once I disabled it everything went back to working normally.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js EACCES error when listening on most ports
It means node is not able to listen on defined port. Change it to something like 1234 or 2000 or 3000 ...
Read more >
How to fix `listen EACCES: permission denied` on any port
Try to uninstall and reinstall the whole WSL distro and redo all the steps. Or redo the steps in a newer distro install....
Read more >
How To Handle `Error: EACCES: permission denied`
The Solution. The best solution I have found to resolve this error is as follows: Open PowerShell as Admin and stop winnat with...
Read more >
Error: listen EACCES: permission denied 0.0.0.0:3000 - Bugs
I haven't made any changes, so this was working fine before the update. Error: Error: listen EACCES: permission denied 0.0.0.0:3000 events.js: ...
Read more >
permission denied 0.0.0.0:{{PORT}} I got an error listen EACCES
I got an error listen EACCES: permission denied 0.0.0.0:4200 while starting Angular project by “npm start”. Solution 1. Run: net stop winnat
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found