cnpm install -g vue-cli出错了 TypeError

D:\node>cnpm install -g vue-cli

C:\Users\lenovo\AppData\Roaming\npm\node_modules\cnpm\node_modules\_chalk@2.3.2@chalk\index.js:72

ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');

                                                                          ^


TypeError: Cannot read property 'close' of undefined

    at Object.<anonymous> (C:\Users\lenovo\AppData\Roaming\npm\node_modules\cnpm\node_modules\_chalk@2.3.2@chalk\index.js:72:75)

    at Module._compile (module.js:652:30)

    at Object.Module._extensions..js (module.js:663:10)

    at Module.load (module.js:565:32)

    at tryModuleLoad (module.js:505:12)

    at Function.Module._load (module.js:497:3)

    at Module.require (module.js:596:17)

    at require (internal/module.js:11:18)

    at Object.<anonymous> (C:\Users\lenovo\AppData\Roaming\npm\node_modules\cnpm\node_modules\log-symbols\index.js:2:15)

    at Module._compile (module.js:652:30)


llShe
浏览 3565回答 1
1回答

Geoion

删掉 C:\Users\lenovo\AppData\Roaming\npm\node_modules\cnpm\node_modules\_chalk@2.3.2@chalk 这个目录,重新执行 cnpm install -g vue-cli
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Vue.js