Skip to content

Vue-cli problems with Metalsmith 2.1.0 #81

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

Closed
chatondearu opened this issue Apr 22, 2016 · 4 comments
Closed

Vue-cli problems with Metalsmith 2.1.0 #81

chatondearu opened this issue Apr 22, 2016 · 4 comments
Labels

Comments

@chatondearu
Copy link

chatondearu commented Apr 22, 2016

I have upgrade recently vue-cli to get the latest version but I can't create a new project.

I use npm version 2.14.4
and node version 0.12.7

$ vue init
/usr/local/lib/node_modules/vue-cli/node_modules/metalsmith/lib/index.js:190
Metalsmith.prototype.build = unyield(function*(){
                                             ^
SyntaxError: Unexpected token *
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/vue-cli/node_modules/metalsmith/index.js:6:18)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

did you know how can I fix this ?

I think this an error with the Metalsmith who use ES6 and maybe we need to add Harmonize
see this issue metalsmith/metalsmith#151

-- EDIT --
I have replace Metalsmith dependency ^2.1.0 with ^1.7.0 to fix this but it's not good solution for me.

see https://www.npmjs.com/package/metalsmith#using-nodejs-012x

@chrisvfritz
Copy link
Contributor

Thanks for letting us know! I'm personally leaning towards adding a note about supported node versions, recommending people upgrade to at least the latest LTS version (4.2).

@kkinder
Copy link

kkinder commented Jan 1, 2017

Is it just me or is this still an issue even if you have node 4.x?

$ npm -v
4.0.5
$ node -v
v0.12.2
$
$ vue init webpack-simple hello
/usr/local/lib/node_modules/vue-cli/node_modules/metalsmith/lib/index.js:190
Metalsmith.prototype.build = unyield(function*(){
                                             ^
SyntaxError: Unexpected token *
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/vue-cli/node_modules/metalsmith/index.js:6:18)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

@posva
Copy link
Member

posva commented Jan 1, 2017

@kkinder Look at that log again 😛 , you have node 0.12

@kkinder
Copy link

kkinder commented Jan 2, 2017

Right you are. That's embarrassing. I was looking at the npm version. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants