简体   繁体   English

安装时Vue Webpack-Simple错误

[英]Vue webpack-simple error while installing

when i'm run webpack-simple cli the terminal showing this error for me , please how can i solve it? 当我运行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)
➜  ~

Be sure that you have the latest version of vue-cli and node.js 确保您拥有最新版本的vue-clinode.js

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

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

After that try again write down this line: 之后,再次尝试写下这一行:

vue init webpack-simple my-project

If it won't help try remove all your global node_modules folder and install again. 如果这样做没有帮助,请尝试删除所有全局node_modules文件夹,然后重新安装。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM