2017-06-29 65 views
0

試圖執行的Heroku登錄:Heroku的LOGIN在Ubuntu 17.04

heroku login 
WARNING 
WARNING Node version must be >=7.10.0 to use the Heroku CLI 
WARNING 
/opt/npm-global/lib/node_modules/heroku-cli/node_modules/cli-engine/lib/cli.js:73 
    async run() { 
     ^^^ 
SyntaxError: Unexpected identifier 
    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> (/opt/npm-global/lib/node_modules/heroku-cli/bin/run.js:10:34) 
    at Module._compile (module.js:570:32) 

回答

1

看起來你的節點的版本是過時的。在嘗試添加heroku作爲我可以在Cloud9中推送代碼的位置時遇到同樣的問題。如果您使用nvm,以下命令將有所幫助。

$ node --version 
v4.7.3 
$ nvm install 8.1.3 
Downloading https://nodejs.org/dist/v8.1.3/node-v8.1.3-linux-x64.tar.xz... 
######################################################################## 100.0% 
Now using node v8.1.3 (npm v5.0.3) 
$ node --version 
v8.1.3 

在此之後,我沒有得到這樣的錯誤。如果這沒有幫助,那麼你可能想要谷歌周圍如何更新節點。這可能值得一試:https://stackoverflow.com/a/41196107。祝你好運!

相關問題