Skip to content

Cannot access vue-cli using phone on local wifi network #4768

@nigel-dewar

Description

@nigel-dewar

Version

3.12.0

Reproduction link

https://github.com/Armour/vue-typescript-admin-template/tree/minimal

Environment info

System:
    OS: Windows 10
    CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz  
  Binaries:
    Node: 10.15.3 - C:\Program Files\nodejs\node.EXE       
    Yarn: 1.12.3 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.18362.387.0
  npmPackages:
    @tinymce/tinymce-vue:  3.0.1 
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0 
    @vue/babel-plugin-transform-vue-jsx:  1.0.0 
    @vue/babel-preset-app:  3.11.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.11.0
    @vue/cli-plugin-babel: ^3.11.0 => 3.11.0
    @vue/cli-plugin-e2e-cypress: ^3.11.0 => 3.11.0
    @vue/cli-plugin-eslint: ^3.11.0 => 3.11.0
    @vue/cli-plugin-pwa: ^3.11.0 => 3.11.0
    @vue/cli-plugin-typescript: ^3.11.0 => 3.11.0
    @vue/cli-plugin-unit-jest: ^3.11.0 => 3.11.0
    vue-class-component: ^7.1.0 => 7.1.0
    vue-cli-plugin-element: ^1.0.1 => 1.0.1
    vue-cli-plugin-style-resources-loader: ^0.1.3 => 0.1.3
    vue-count-to:  1.0.13
    vue-eslint-parser:  5.0.0 (2.0.3)
    vue-hot-reload-api:  2.3.3
    vue-i18n:  8.14.0
    vue-image-crop-upload:  2.5.0
    vue-jest:  3.0.4
    vue-loader:  15.7.1
    vue-property-decorator: ^8.2.2 => 8.2.2
    vue-router: ^3.1.2 => 3.1.2
    vue-splitpane:  1.0.4
    vue-style-loader:  4.1.2
    vue-svgicon: ^3.2.6 => 3.2.6
    vue-template-compiler: ^2.6.10 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
    vue2-dropzone:  3.6.0
    vuedraggable:  2.23.0
    vuex: ^3.1.1 => 3.1.1
    vuex-class: ^0.3.2 => 0.3.2
    vuex-module-decorators: ^0.10.1 => 0.10.1
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

Open up port 8080 in Windows Firewall. Run yarn serve
You will be able to run fine on local machine
Try to connect to the provided IP address and port on your phone ie. http://192.168.0.5:8080

What is expected?

Should be able to see your vue website on your phone

What is actually happening?

Get denied. Wont show on phone


Have tried settings things in vue.config.js like this

devServer: {
host: '0.0.0.0',//your ip address
port: 8080,
...
}

but doesnt work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions