1桩了、啟動命令
安裝vue
cnpm install -g vue-cli
新啟一個項目
新建項目的時候報錯:
(dv) root@JoJo:~# vue-init webpack todolist
/usr/local/lib/node_modules/vue-cli/bin/vue-init:60
let template = program.args[0]
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
root@JoJo:/etc/mysql/mysql.conf.d# node -v
v4.2.6
root@JoJo:/etc/mysql/mysql.conf.d# npm -v
3.5.2
可能是版本太低了恳邀。
npm install -g n
sudo n stable
sudo npm install npm -g / npm i -g npm