when I initial a new project, I used commands as follows:
vue init webpack my-pro
cd my-pro/
npm install
npm run dev
then, it shows :
" DONE Compiled successfully in 5653ms
Your application is running here: http://localhost:8080" in command line",
but when I open chrome and address in localhost:8080,
there is an error:
"Uncaught SyntaxError: Use of const in strict mode. "
so, how could I solve it?
ps: node version v8.8.0
Hm, that's weird. Could you just double check that you are using node 8.8.0? As long as you are on node greater than v4, you should be good to go.
Could you just describe your environment a little more? node, npm versions, OS, etc.
Are you running your app from the OS cli or using some IDE?
OK, my OS is ubuntu 12.04. node v8.8.0 npm 5.4.2, vue 2.9.2.
No one had such a problem before. So confused!!!!!
I can't reproduce this (I'm on OS X though).
Does the error tell you where that syntax error is happening?
Well, I use command "vue init browserify my-bro", and everything's ok.
I'll show you everything that happend on me.
Ops, why can't I paste any picture here?
I show it in words.
1,vue init webpack my-pro2
cd my-pro2
npm install
npm run dev
and in command line it shows:
DONE Compiled successfully in 15155ms 09:50:43
I Your application is running here: http://localhost:8080
2,my chrome address in http://localhost:8080/ and show nothing.
3, F12, and in console :
Uncaught SyntaxError: Use of const in strict mode. localhost/:6
There are all the things I know.
I think I got the same error, there are something helpful for me:
https://github.com/webpack/webpack-dev-server/issues/1105
https://github.com/mrdulin/blog/issues/35
there are two way to resolved it:
webpack-dev-server version 2.7.1;babel-loader include webpack-dev-server/client/index.js;I resolve it like that:
set ./build/webpack.base.config.js
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
},
Hm, that's a weird choice by the maintainers.
I think we should add this workaround to the template.
Thanks for getting to the bottom of this.
I just pushed that fix to the develop branch, anyone interested can test it out with
vue init webpack#develop
I update my OS to Ubuntu 14.04. (before is 12.04.) and then everything is OK.
Thank you very much!
I met the same problem
and i did it like that
1、use webpack-dev-server version 2.7.1;
2、set babel-loader include webpack-dev-server/client/index.js;
but it did not work, i dont know how to resolve it
who could do me a favor?
I think I got the same error, there are something helpful for me:
webpack/webpack-dev-server#1105
mrdulin/blog#35there are two way to resolved it:
- use
webpack-dev-serverversion2.7.1;- set
babel-loaderincludewebpack-dev-server/client/index.js;I resolve it like that:
set./build/webpack.base.config.js{ test: /\.js$/, loader: 'babel-loader', include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] },我这边设置 没有用啊
I think I got the same error, there are something helpful for me:
webpack/webpack-dev-server#1105
mrdulin/blog#35
there are two way to resolved it:
- use
webpack-dev-serverversion2.7.1;- set
babel-loaderincludewebpack-dev-server/client/index.js;I resolve it like that:
set./build/webpack.base.config.js{ test: /\.js$/, loader: 'babel-loader', include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] },我这边设置 没有用啊
我也是不生效

Most helpful comment
I think I got the same error, there are something helpful for me:
https://github.com/webpack/webpack-dev-server/issues/1105
https://github.com/mrdulin/blog/issues/35
there are two way to resolved it:
webpack-dev-serverversion2.7.1;babel-loaderincludewebpack-dev-server/client/index.js;I resolve it like that:
set
./build/webpack.base.config.js