【问题标题】:Vue webpack-simple error while installing安装时Vue webpack-simple错误
【发布时间】:2018-03-05 04:40:07
【问题描述】:

当我运行 webpack-simple cli 时,终端显示此错误,请问我该如何解决?

/usr/local/lib/node_modules/vue-cli/node_modules/deep-extend/lib/deep-extend.js:1
(function (exports, require, module, __filename, __dirname) {

SyntaxError: Invalid or unexpected token
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/vue-cli/node_modules/rc/index.js:4:18)
    at Module._compile (module.js:570:32)
➜  ~

【问题讨论】:

标签: javascript webpack vue.js vue-component


【解决方案1】:

确保您拥有最新版本的vue-clinode.js

更新 vue-cli: npm update vue-cli --save -g

更新 npm 版本: npm install npm@latest -g

然后再试写下这一行:

vue init webpack-simple my-project

如果没有帮助,请尝试删除所有全局 node_modules 文件夹并重新安装。

【讨论】:

  • 感谢我完全删除了 npm 文件夹然后我重新安装节点并且它工作但我遇到了 wepback-simple 的问题 无法下载 repo vuejs-templates/wepback-simple 但是当我初始化 wepback 它工作正常,我怎样才能初始化 wepback-simple
猜你喜欢
  • 2017-11-21
  • 1970-01-01
  • 2017-12-21
  • 1970-01-01
  • 2019-08-30
  • 2017-02-01
  • 1970-01-01
  • 2018-03-27
  • 1970-01-01
相关资源
最近更新 更多