Skip to content

The default generated vue-cli app isn't served on http://localhost:8080/ although other ports work #4437

@arnavb

Description

@arnavb

Version

3.10.0

Reproduction link

https://github.com/arnavb/test-vue-port-issue

Environment info


Environment Info:

  System:
    OS: macOS 10.14.5
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
  Binaries:
    Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
    Yarn: Not Found
    npm: 6.10.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
  Browsers:
    Chrome: 76.0.3809.100
    Firefox: Not Found
    Safari: 12.1.1
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0 
    @vue/babel-plugin-transform-vue-jsx:  1.0.0 
    @vue/babel-preset-app:  3.10.0 
    @vue/babel-preset-jsx:  1.1.0 
    @vue/babel-sugar-functional-vue:  1.0.0 
    @vue/babel-sugar-inject-h:  1.0.0 
    @vue/babel-sugar-v-model:  1.0.0 
    @vue/babel-sugar-v-on:  1.1.0 
    @vue/cli-overlay:  3.10.0 
    @vue/cli-plugin-babel: ^3.10.0 => 3.10.0 
    @vue/cli-plugin-eslint: ^3.10.0 => 3.10.0 
    @vue/cli-service: ^3.10.0 => 3.10.0 
    @vue/cli-shared-utils:  3.10.0 
    @vue/component-compiler-utils:  2.6.0 (3.0.0)
    @vue/preload-webpack-plugin:  1.1.1 
    @vue/web-component-wrapper:  1.2.0 
    eslint-plugin-vue: ^5.0.0 => 5.2.3 (4.7.1)
    vue: ^2.6.10 => 2.6.10 
    vue-eslint-parser:  2.0.3 (5.0.0)
    vue-hot-reload-api:  2.3.3 
    vue-loader:  15.7.1 
    vue-style-loader:  4.1.2 
    vue-template-compiler: ^2.6.10 => 2.6.10 
    vue-template-es2015-compiler:  1.9.1 
  npmGlobalPackages:
    @vue/cli: 3.10.0

Steps to reproduce

What is expected?

The vue cli app is properly served.

What is actually happening?

I get a ERR_CONNECTION_RESET upon doing opening the URL. However, the network url works correctly. In addition, running say npm run serve -- --port 3000 works for both provided URLs.


Just to make sure this wasn't a problem with my port 8080 (not sure how that would happen), I added a file to the repository called http-server-on-8080.js with the following content:

const http = require("http");

http
  .createServer((req, res) => {
    res.write("Hello World!");
    res.end();
  })
  .listen(8080);

When I run node http-server-on-8080.js and visit http://localhost:8080/, however, I am greeted with the words "Hello World!". As such, this leads me to believe that this is an issue with vue-cli of some sort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cannot reproduceWe cannot reproduce the problem with the given information. More env information needed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions