Vue-cli: Error installing vue-cli because coffeescript moved

Created on 30 Nov 2017  路  10Comments  路  Source: vuejs/vue-cli

Hi
System: Windows 10, node version 8.3.0
npm i -g vue-cli gives this error:

> [email protected] postinstall C:\Users\Dave\AppData\Roaming\npm\node_modules\vue-cli\node_modules\coffee-script
> node --eval 'if (require("./package.json").name === "coffee-script") { var red, yellow, cyan, reset; red = yellow = cyan = reset = ""; if (!process.env.NODE_DISABLE_COLORS) { red = "\x1b[31m"; yellow = "\x1b[33m"; cyan = "\x1b[36m"; reset = "\x1b[0m"; } console.warn(red + "CoffeeScript has moved!" + reset + " Please update references to " + yellow + "\"coffee-script\"" + reset + " to use " + yellow + "\"coffeescript\"" + reset + " (no hyphen) instead."); console.warn("Also, a new major version has been released under the " + yellow + "coffeescript" + reset + " name on NPM. This new release targets modern JavaScript, with minimal breaking changes. Learn more at " + cyan + "http://coffeescript.org" + reset + "."); console.warn(""); }'

[eval]:1
'if
^^^

SyntaxError: Invalid or unexpected token
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:573:30)
    at evalScript (bootstrap_node.js:435:27)
    at startup (bootstrap_node.js:139:9)
    at bootstrap_node.js:578:3

i guess it's because of this
https://www.npmjs.com/package/coffee-script
Now coffee-script is coffeescript

Most helpful comment

Unfortunately metalsmith is using an outdated major version of gray-matter so that PR won't actually fix vue-cli. Looks like we'll have to fork metalsmith...

All 10 comments

It's something that has to be fixed in a dependency of one of our dependencies. Someone already created a PR for it at https://github.com/jonschlinkert/gray-matter/pull/56

So we'll wait for it to be released and then reinstalling vue-cli would reinstall the updated version of gray-matter

Ideally, we should also ask https://github.com/segmentio/metalsmith/ to update to that version and finally, update the version in the package.json file here

edit: metalsmith would also need to upgrade the version the use for gray-matter and adapt the code (major relaese of gray-matter)

I'm leaving this open hoping that people will see it instead of opening new issues

OK, let's try again tomorrow

oh god I just wanted to start with vue-cli and get the same error haha

Unfortunately metalsmith is using an outdated major version of gray-matter so that PR won't actually fix vue-cli. Looks like we'll have to fork metalsmith...

Weird thing though, installation seems to work fine on MacOS despite the warning. Is this Windows only?

Should be fixed in 2.9.2 by explicitly pinning coffee-script version

鐜鍙橀噺閰嶅ソ浜嗗悧

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jgribonvald picture jgribonvald  路  3Comments

joshuajohnson814 picture joshuajohnson814  路  3Comments

eladcandroid picture eladcandroid  路  3Comments

brandon93s picture brandon93s  路  3Comments

BusyHe picture BusyHe  路  3Comments