Vue webpack-安装时的简单错误

时间:2017-09-23 21:20:54

标签: javascript webpack vue.js vue-component

当我运行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)
➜  ~

1 个答案:

答案 0 :(得分:0)

请确保您拥有最新版本的node.jsnpm update vue-cli --save -g

更新vue-cli: npm install npm@latest -g

更新npm版本: vue init webpack-simple my-project

之后再试一次,写下这一行:

node_modules

如果它不能帮助您尝试删除所有全局bundle exec rake redmine:plugins:migrate RAILS_ENV=production 文件夹并重新安装。