Error when starting dev server permission denied 127.0.0.1:3000
See original GitHub issueDescribe the bug
The OS seems to slam down the dev server when it tries to run.
Important to note that http-server on 8080 and node express apps on 3000 launch without a problem on the same VDI
Error:
demo@0.0.0 dev vite error when starting dev server: Error: listen EACCES: permission denied 127.0.0.1:3000 at Server.setupListenHandle [as _listen2] (node:net:1317:21) at listenInCluster (node:net:1382:12) at doListen (node:net:1520:7) at processTicksAndRejections (node:internal/process/task_queues:84:21) The terminal process “C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command npm run dev” terminated with exit code: 1.
If need to flip a permission, I just need to know which one.
Thanks,
Rob
Reproduction
Open vscode
Open folder (then create one on-the-fly)
Open a terminal
npm init vitejs@latest . enter enter npm install npm run dev
System Info
**Environment**
Citrix VDI
Microsoft Windows [Version 10.0.19042.1348]
running vitejs@latest as 2021-11-22
VSCode: 1.62.2
Template: vanilla
Node version: v17.1.0
**PowerShell info**
$PSVersionTable
Name Value
---- -----
PSVersion 5.1.19041.1320
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1320
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
When I run the dev server from CMD I get a similar error.
Used Package Manager
npm
Logs
Is there an actual log file? The output from the terminal windows is below:
> vite --debug
vite:config no config file found. +0ms
vite:config using resolved config: {
vite:config root: 'Z:/var/gist/7132/wksp_web/test-vite_04',
vite:config base: '/',
vite:config mode: 'development',
vite:config configFile: undefined,
vite:config logLevel: undefined,
vite:config clearScreen: undefined,
vite:config server: { fs: { strict: undefined, allow: [Array] } },
vite:config configFileDependencies: [],
vite:config inlineConfig: {
vite:config root: undefined,
vite:config base: undefined,
vite:config mode: undefined,
vite:config configFile: undefined,
vite:config logLevel: undefined,
vite:config clearScreen: undefined,
vite:config server: { fs: [Object] }
vite:config },
vite:config resolve: { dedupe: undefined, alias: [ [Object], [Object] ] },
vite:config publicDir: 'Z:\\var\\gist\\7132\\wksp_web\\test-vite_04\\public',
vite:config cacheDir: 'Z:\\var\\gist\\7132\\wksp_web\\test-vite_04\\node_modules\\.vite',
vite:config command: 'serve',
vite:config isProduction: false,
vite:config plugins: [
vite:config 'vite:pre-alias',
vite:config 'alias',
vite:config 'vite:modulepreload-polyfill',
vite:config 'vite:resolve',
vite:config 'vite:html-inline-script-proxy',
vite:config 'vite:css',
vite:config 'vite:esbuild',
vite:config 'vite:json',
vite:config 'vite:wasm',
vite:config 'vite:worker',
vite:config 'vite:asset',
vite:config 'vite:define',
vite:config 'vite:css-post',
vite:config 'vite:client-inject',
vite:config 'vite:import-analysis'
vite:config ],
vite:config build: {
vite:config target: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
vite:config polyfillModulePreload: true,
vite:config outDir: 'dist',
vite:config assetsDir: 'assets',
vite:config assetsInlineLimit: 4096,
vite:config cssCodeSplit: true,
vite:config cssTarget: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
vite:config sourcemap: false,
vite:config rollupOptions: {},
vite:config minify: 'esbuild',
vite:config terserOptions: {},
vite:config write: true,
vite:config emptyOutDir: null,
vite:config manifest: false,
vite:config lib: false,
vite:config ssr: false,
vite:config ssrManifest: false,
vite:config reportCompressedSize: true,
vite:config chunkSizeWarningLimit: 500,
vite:config watch: null,
vite:config commonjsOptions: { include: [Array], extensions: [Array] },
vite:config dynamicImportVarsOptions: { warnOnError: true, exclude: [Array] }
vite:config },
vite:config env: { BASE_URL: '/', MODE: 'development', DEV: true, PROD: false },
vite:config assetsInclude: [Function: assetsInclude],
vite:config logger: {
vite:config hasWarned: false,
vite:config info: [Function: info],
vite:config warn: [Function: warn],
vite:config warnOnce: [Function: warnOnce],
vite:config error: [Function: error],
vite:config clearScreen: [Function: clearScreen],
vite:config hasErrorLogged: [Function: hasErrorLogged]
vite:config },
vite:config createResolver: [Function: createResolver],
vite:config optimizeDeps: {
vite:config esbuildOptions: { keepNames: undefined, preserveSymlinks: undefined }
vite:config }
vite:config } +21ms
vite:deps Hash is consistent. Skipping. Use --force to override. +0ms
error when starting dev server:
Error: listen EACCES: permission denied 127.0.0.1:3000
at Server.setupListenHandle [as _listen2] (node:net:1317:21)
at listenInCluster (node:net:1382:12)
at doListen (node:net:1520:7)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command npm run debug-dev" terminated with exit code: 1.
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:17 (7 by maintainers)
Top GitHub Comments
I have encountered the same problem and solved by the following methods.
net stop winnat
net start winnat
References: https://stackoverflow.com/questions/60485038/ng-server-listen-eacces-permission-denied-127-0-0-14200
I am closing this issue because I believe this is caused by something specific to your VDI setup.
Please create a discussion if you need help. 😃