2017-03-07 88 views
1

我試圖用遠程開發啓動Nuclide + Atom。Nuclide + Atom遠程開發無法在Ubuntu上運行16.04

我通過軟件包管理器安裝核素對Atom和安裝核素服務器(Ubuntu的16.04)

npm install -g nuclide 

我的第一個麻煩是:

nohup: failed to run command 'node': No such file or directory 
在覈素服務器啓動日誌文件

,但我解決它nodejs vs node on ubuntu 12.04 (不要認爲這個權利... :)但它適用於我)

而我得到了第二個麻煩:

/usr/local/lib/node_modules/nuclide/pkg/nuclide-server/lib/nuclide-main.js:20 
const {__DEV__} = require('../../nuclide-node-transpiler/lib/env'); 
    ^

    SyntaxError: Unexpected token { 
     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 

在nuclide-server-start日誌文件中。

當我通過NPM安裝核素服務器它告訴我

WARN engine [email protected]: wanted: {"atom":">=1.14.1","node":">=6.5.0"} (current: {"node":"4.2.6","npm":"3.5.2"}) 

5月是一個原因,我的麻煩?

有人幫忙! :)

+0

我試圖升級我的nodejs通過apt-get,但它告訴我,實際版本的軟件包安裝:( –

回答

1

首先我想從NPM更新我的NodeJS:

$ sudo npm install -g node 

,我得到了一個答案:

npm WARN deprecated [email protected]: To update or install node, go to http://nodejs.org/ 
/usr/local/lib 
└── [email protected] 

然後我嘗試一些方式來更新我的NodeJS,描述如下:https://github.com/kevincobain2000/instagram-bot-api/issues/1

$ sudo npm cache clean -f && sudo npm install -g n && sudo n stable 

npm WARN using --force I sure hope you know what you are doing. 
/usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n 
/usr/local/lib 
└── [email protected] 

    install : node-v7.6.0 
     mkdir : /usr/local/n/versions/node/7.6.0 
     fetch : https://nodejs.org/dist/v7.6.0/node-v7.6.0-linux-x64.tar.gz 
######################################################################## 100.0% 
    installed : v7.6.0 

之後,nuclide-server-start成功啓動! :)