-
Notifications
You must be signed in to change notification settings - Fork 4.4k
vue-cli init with some unknown error : Uncaught SyntaxError: Use of const in strict mode. #1140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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. |
OK, my OS is ubuntu 12.04. node v8.8.0 npm 5.4.2, vue 2.9.2. |
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
2,my chrome address in http://localhost:8080/ and show nothing. 3, F12, and in console :
There are all the things I know. |
I think I got the same error, there are something helpful for me: webpack/webpack-dev-server#1105 there are two way to resolved it:
I resolve it like that: {
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
|
I update my OS to Ubuntu 14.04. (before is 12.04.) and then everything is OK. |
Thank you very much! |
* develop: bump template version fix bug with #1202 Make CSS sourcemaps on by default Ensure page reloads in history mode serve index.html use old sourcemap option Add postcss-url to match postcss-import (#1115) Change engine>node{4 => 6} for template (#1206) Fix static file serving for publicPath != `/` (fix#1176) (#1180) Load, render template version using helper (#1202) fix typo in a comment (#1183) fix #1140
I met the same problem but it did not work, i dont know how to resolve it |
我这边设置 没有用啊 |
|
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
The text was updated successfully, but these errors were encountered: