Skip to content

控制台显示的IP地址有点问题 #3266

Closed
@liaowentuan

Description

@liaowentuan

Version

3.2.0

Environment info

 System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i3-4160 CPU @ 3.60GHz
  Binaries:
    Node: Not Found
    Yarn: Not Found
    npm: 6.2.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 41.16299.785.0
  npmPackages:
    @vue/babel-preset-app:  3.2.0
    @vue/cli-overlay:  3.2.0
    @vue/cli-plugin-babel: ^3.2.0 => 3.2.0
    @vue/cli-plugin-typescript: ^3.2.0 => 3.2.0
    @vue/cli-service: ^3.2.0 => 3.2.0
    @vue/cli-shared-utils:  3.2.0
    @vue/component-compiler-utils:  2.3.1
    @vue/preload-webpack-plugin:  1.1.0
    @vue/web-component-wrapper:  1.2.0
    babel-helper-vue-jsx-merge-props:  2.0.3
    babel-plugin-transform-vue-jsx:  4.0.1
    vue: ^2.5.17 => 2.5.21
    vue-class-component: ^6.0.0 => 6.3.2
    vue-hot-reload-api:  2.3.1
    vue-lazyload:  1.2.3
    vue-loader:  15.4.2
    vue-property-decorator: ^7.0.0 => 7.2.0
    vue-router: ^3.0.1 => 3.0.2
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.5.17 => 2.5.21
    vue-template-es2015-compiler:  1.6.0
    vuex: ^3.0.1 => 3.0.1
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

vue.config.js
devServer: {
// host: 'localhost',
host: "0.0.0.0",
port: 8000,
npm run serve 后,别的小伙伴使用 Network地址 无法打开

What is expected?

npm run serve 后上面的Network地址显示的是别人都能访问的地址

What is actually happening?

我的电脑有3个IPv4的地址,使用的是最下面的那个无线局域网适配器的IP地址;而控制台显示的是最上面那个地址,故无法使用别的电脑通过命令行上显示的 ‘Network‘地址打开


npm run serve 后上面的Network地址要么不显示;要么就全显示吧

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions