1
votes

I initialized a vue project by vue/cli, and i do not change any code.After init completion, i run the command to start a development server by npm run dev.And the output show the the server running on localhost:8080, but i can not access it neither by localhost:8080 nor 127.0.0.1:8080.

I haved tried to uninstall safety software, choose vue/cli@2, check hosts file.

C:\Users\Administrator\Desktop\cl>node -v
v10.16.3

C:\Users\Administrator\Desktop\cl>npm -v
6.9.0

"webpack-dev-server": {
      "version": "2.11.5",
1

1 Answers

0
votes

Try npm run serve. You are not telling vue-cli-service to start a server, only to build locally.