Skip to content

Error installing vue-cli because coffeescript moved #655

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
fellz opened this issue Nov 30, 2017 · 10 comments
Closed

Error installing vue-cli because coffeescript moved #655

fellz opened this issue Nov 30, 2017 · 10 comments

Comments

@fellz
Copy link

fellz commented Nov 30, 2017

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

> coffee-script@1.12.8 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

@a062670
Copy link

a062670 commented Nov 30, 2017

CoffeeScript has moved!

https://www.npmjs.com/package/coffee-script

@posva
Copy link
Member

posva commented Nov 30, 2017

It's something that has to be fixed in a dependency of one of our dependencies. Someone already created a PR for it at jonschlinkert/gray-matter#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)

@vuejs vuejs deleted a comment from agogex Nov 30, 2017
@vuejs vuejs deleted a comment from lihua123569 Nov 30, 2017
@posva posva changed the title Error installing vue-cli Error installing vue-cli because coffeescript moved Nov 30, 2017
@posva
Copy link
Member

posva commented Nov 30, 2017

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

@lihua123569
Copy link

OK, let's try again tomorrow

@cloudbluedigital
Copy link

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

@yyx990803
Copy link
Member

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...

@yyx990803
Copy link
Member

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

@yyx990803
Copy link
Member

@yyx990803
Copy link
Member

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

@bigmax01
Copy link

环境变量配好了吗

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

No branches or pull requests

7 participants