Nuclide + Atom远程开发不适用于Ubuntu 16.04

时间:2017-03-07 08:57:19

标签: node.js web atom-editor nuclide-editor

我尝试通过远程开发启动Nuclide + Atom。

我已经通过Atom上的软件包管理器安装了Nuclide并安装了Nuclide Server(Ubuntu 16.04)

npm install -g nuclide

我的第一个麻烦是:

nohup: failed to run command 'node': No such file or directory

在nuclide-server-start日志文件中,但我通过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安装nuclide-server时它告诉我

WARN engine nuclide@0.208.0: wanted: {"atom":">=1.14.1","node":">=6.5.0"} (current: {"node":"4.2.6","npm":"3.5.2"})
可能是我遇到麻烦的原因吗?

有人帮忙! :)

1 个答案:

答案 0 :(得分:1)

首先我尝试从npm更新我的nodeJS:

$ sudo npm install -g node

我得到了答案:

npm WARN deprecated node@0.0.0: To update or install node, go to http://nodejs.org/
/usr/local/lib
└── node@0.0.0 

然后我尝试某种方式来更新我的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
└── n@2.1.4 

     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成功启动! :)