browser-sync: Error: listen EACCES: permission denied 0.0.0.0:3000
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
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 15
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
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.
Open the terminal in administrator and use the command
net stop winnatand afternet start winnat.For anyone hitting their heads on the wall trying to figure this out, it can be any new or old network connection. In my case, docker was working fine with webpack server and then I installed a bluetooth USB dongle that created a new network that somehow messed with the system ports?/network? So I had to disable that bluetooth network connection and not docker vEthernat NAT adapter.
Stupid problems, stupid solutions: before:
I don’t understand why but
typeof config.app.port // stringsolution ->config.app.port = parseInt(process.env.APP_PORT)do as below to fix this on windows
You don’t need to do all of those things above. Just follow this tutorial: How to fix EACCESS permission denied 0.0.0.0:3000
I don’t understand docker ??? where can I shut it down???
another solution here. try using a greater port like
30000, this problem barely happens to me now. no need to disable vEthernat NAT adapter frequently.VirtualBox connections were my problem on Windows 10. I used @bonovski guidance and disabled those connections. After that my error disappeared.
disable vEthernat NAT adapter solved the problem(it is a solution but not the best), my question is why browser-sync still trying to access
0.0.0.0in order to listen all possible ip after i specify thehost. in this case, i expect browser-sync only listenlocalhost:3001.