Code-server: The feature watch recursively is unavailable on the current platform, which is being used to r un Node.js.

Created on 21 Jul 2020  ·  5Comments  ·  Source: cdr/code-server


When I run my custom plugin with local VSCode env, It do well. But I run it with code-server, error occur.

【ERROR: The feature watch recursively is unavailable on the current platform, which is being used to r
un Node.js.】

I guess error causes by this problem:
Node v14 introduced a breaking change to the fs.watch() API.
It report and fix have been submitted to filewatch: http://github.com/fgnass/filewatcher/pull/6
TIM截图20200721114722

Web Browser: Chrome
Local OS: Window
Remote OS: Centos 7
Remote Architecture: Docker
code-server --version:
code-server: v3.4.1
VS Code: v1.45.1
Commit: 48f7c2724827e526eeaa6c2c151c520f48a61259
Date: 2020-06-04T10:39:14Z
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116
Safari/537.36

Based on I said before, may I have your reply about it.

  1. Node problem do make it error,right?
  2. What I should do now,and What I should do after node problem solved.
bug

All 5 comments

I think the only workaround right now would be to run code-server with your own version of Node (use 12 since that's what VS Code uses).

It'll depend on where code-server is installed but for example: node /usr/lib/code-server.

For the long term, we'll need to target the same version of Node VS Code does. I'll open an issue for it.

Thanks for your reply.

I think your suggestion would work for my question, after I install code-server on newest node version in my local environments.

However, it is a pity, my team is working on docker of code-server.
Shall we have the Dockerfile for reference to build code-server on 12+ node by ourselves? 😄

Or not, we could only try do it ourselves from the beginning.

Looking forward to hearing from you.

We'll publish a new version as soon as we can but we've got a PR open which you could use to build it yourself in the meantime: https://github.com/cdr/code-server/pull/1904

If you're looking to build your own Docker container then you can follow the build instructions here. We build code-server in a Centos 7 Docker container (Dockerfile here) and then we deploy a Debian container (Dockerfile here).

@code-asher How nice you are. 😄

You did a great job. I would try it myself before.

Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lshamis picture lshamis  ·  3Comments

broady picture broady  ·  3Comments

balazssoltesz picture balazssoltesz  ·  3Comments

nol166 picture nol166  ·  3Comments

pchecinski picture pchecinski  ·  3Comments