我试图通过远程开发启动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 [email protected]: wanted: {"atom":">=1.14.1","node":">=6.5.0"} (current: {"node":"4.2.6","npm":"3.5.2"})


可能是我遇到麻烦的原因吗?

有人帮忙! :)

最佳答案

首先,我尝试从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]


然后我尝试一些方法来更新我的nodeJ,如下所述: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! :)

关于node.js - Nuclide + Atom远程开发在Ubuntu 16.04上不起作用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42643940/

10-11 07:48