Vue-cli: 请尽快修复coffee-script安装失败的问题

Created on 30 Nov 2017  ·  17Comments  ·  Source: vuejs/vue-cli

目前无法完成 npm i -g vue-cli 的操作。
错误问题:Error: [email protected] postinstall: 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(""); }'
分析原因:coffee-script模块已被移除,改为 coffeescript

Most helpful comment

mark

f**k NPM

PR 4 gray-matter

All 17 comments

mark

f**k NPM

PR 4 gray-matter

CoffeeScript has moved, wait until update

still doesn't work :)

you can modify package.json and run npm update

@sansroman modify which module's package.json,i can's install vue-cli.

@ChangedenCZD I modify global,you can try npm install coffee-script -g & npm update & npm install vue-cli -g,This solves my problem, and I don't know if it's the same for you.don't forget sudo or su root

@sansroman npm install coffee-script -g don't work

@sansroman https://www.npmjs.com/package/coffee-script CoffeeScript has moved!

@ChangedenCZD So replace with coffee-script

@sansroman how can i do this?wait for official update?

@ChangedenCZD What is the wrong message when you run npm install coffee-script -g?

@sansroman Error: [email protected] postinstall: 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(""); }'

@ChangedenCZD no tube,please continue

@sansroman this answer [https://stackoverflow.com/questions/13011290/cannot-find-module-coffee-script] comes from five years ago

@royeaher sorry, but the same issue fixed for me

Duplicate of #655

Was this page helpful?
0 / 5 - 0 ratings