Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Missing dependencies (minimist, yauzl, yazl) #5530

Open
4 tasks done
U5B opened this issue Sep 1, 2022 · 25 comments
Open
4 tasks done

[Bug]: Missing dependencies (minimist, yauzl, yazl) #5530

U5B opened this issue Sep 1, 2022 · 25 comments
Labels
high-priority This issue needs to be resolved ASAP waiting-for-info Waiting for more information from submitter
Milestone

Comments

@U5B
Copy link

U5B commented Sep 1, 2022

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Windows 10
  • Remote OS: Raspberry Pi 4
  • Remote Architecture: armhf
  • code-server --version:

Steps to Reproduce

  1. Install code-server by doing npm --global i code-server --unsafe-perm
  2. Startup code-server with no errors
  3. Send request to server, server gives error

Expected

No errors: webpage should display

Actual

Errors appear

Logs

Loading "minimist" failed
Error: Cannot find module 'minimist'
Require stack:
- /usr/local/lib/node_modules/code-server/lib/vscode/out/bootstrap-amd.js
- /usr/local/lib/node_modules/code-server/out/node/util.js
- /usr/local/lib/node_modules/code-server/out/node/cli.js
- /usr/local/lib/node_modules/code-server/out/node/entry.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Function.Module._load (node:internal/modules/cjs/loader:804:27)
    at Function.require._load (/usr/local/lib/node_modules/code-server/out/node/plugin.js:54:74)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at r (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:101)
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:1720)
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11005)
    at a (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10302)
    at Object.errorback (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10423)
    at e.triggerErrorback (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11369)
    at /usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11075
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:1737)
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11005)
    at a (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10302)
    at o._loadModule (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10432)
    at o._resolve (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:6:452)
    at o.defineModule (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:6144)
    at y (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:6:1825)
    at h (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2554)
    at Object.<anonymous> (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/server/node/server.main.js:75:26132)
    at Object.<anonymous> (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/server/node/server.main.js:176:2108)
    at e._createAndEvalScript (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2598)
    at /usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2237
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/node_modules/code-server/lib/vscode/out/bootstrap-amd.js',
    '/usr/local/lib/node_modules/code-server/out/node/util.js',
    '/usr/local/lib/node_modules/code-server/out/node/cli.js',
    '/usr/local/lib/node_modules/code-server/out/node/entry.js'
  ],
  phase: 'loading',
  moduleId: 'minimist',
  neededBy: [ 'vs/platform/environment/node/argv' ]
}
Here are the modules that depend on it:
[ 'vs/platform/environment/node/argv' ]
Loading "@microsoft/1ds-core-js" failed
Error: Cannot find module '@microsoft/1ds-core-js'
Require stack:
- /usr/local/lib/node_modules/code-server/lib/vscode/out/bootstrap-amd.js
- /usr/local/lib/node_modules/code-server/out/node/util.js
- /usr/local/lib/node_modules/code-server/out/node/cli.js
- /usr/local/lib/node_modules/code-server/out/node/entry.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Function.Module._load (node:internal/modules/cjs/loader:804:27)
    at Function.require._load (/usr/local/lib/node_modules/code-server/out/node/plugin.js:54:74)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at r (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:101)
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:1720)
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11005)
    at a (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10302)
    at Object.errorback (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10423)
    at e.triggerErrorback (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11369)
    at /usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11075
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:1737)
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11005)
    at a (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10302)
    at o._loadModule (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10432)
    at o._resolve (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:6:452)
    at o.defineModule (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:6144)
    at y (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:6:1825)
    at h (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2554)
    at Object.<anonymous> (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/server/node/server.main.js:135:9424)
    at Object.<anonymous> (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/server/node/server.main.js:176:2108)
    at e._createAndEvalScript (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2598)
    at /usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2237
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/node_modules/code-server/lib/vscode/out/bootstrap-amd.js',
    '/usr/local/lib/node_modules/code-server/out/node/util.js',
    '/usr/local/lib/node_modules/code-server/out/node/cli.js',
    '/usr/local/lib/node_modules/code-server/out/node/entry.js'
  ],
  phase: 'loading',
  moduleId: '@microsoft/1ds-core-js',
  neededBy: [ 'vs/server/node/telemetryClient' ]
}
Here are the modules that depend on it:
[ 'vs/server/node/telemetryClient' ]
Loading "yauzl" failed
Error: Cannot find module 'yauzl'
Require stack:
- /usr/local/lib/node_modules/code-server/lib/vscode/out/bootstrap-amd.js
- /usr/local/lib/node_modules/code-server/out/node/util.js
- /usr/local/lib/node_modules/code-server/out/node/cli.js
- /usr/local/lib/node_modules/code-server/out/node/entry.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Function.Module._load (node:internal/modules/cjs/loader:804:27)
    at Function.require._load (/usr/local/lib/node_modules/code-server/out/node/plugin.js:54:74)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at r (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:101)
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:1720)
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11005)
    at a (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10302)
    at Object.errorback (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10423)
    at e.triggerErrorback (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11369)
    at /usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11075
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:1737)
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11005)
    at a (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10302)
    at o._loadModule (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10432)
    at o._resolve (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:6:452)
    at o.defineModule (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:6144)
    at y (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:6:1825)
    at h (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2554)
    at Object.<anonymous> (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/server/node/server.main.js:140:86230)
    at Object.<anonymous> (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/server/node/server.main.js:176:2108)
    at e._createAndEvalScript (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2598)
    at /usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2237
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/node_modules/code-server/lib/vscode/out/bootstrap-amd.js',
    '/usr/local/lib/node_modules/code-server/out/node/util.js',
    '/usr/local/lib/node_modules/code-server/out/node/cli.js',
    '/usr/local/lib/node_modules/code-server/out/node/entry.js'
  ],
  phase: 'loading',
  moduleId: 'yauzl',
  neededBy: [ 'vs/base/node/zip' ]
}
Here are the modules that depend on it:
[ 'vs/base/node/zip' ]
Loading "yazl" failed
Error: Cannot find module 'yazl'
Require stack:
- /usr/local/lib/node_modules/code-server/lib/vscode/out/bootstrap-amd.js
- /usr/local/lib/node_modules/code-server/out/node/util.js
- /usr/local/lib/node_modules/code-server/out/node/cli.js
- /usr/local/lib/node_modules/code-server/out/node/entry.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Function.Module._load (node:internal/modules/cjs/loader:804:27)
    at Function.require._load (/usr/local/lib/node_modules/code-server/out/node/plugin.js:54:74)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at r (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:101)
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:1720)
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11005)
    at a (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10302)
    at Object.errorback (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10423)
    at e.triggerErrorback (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11369)
    at /usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11075
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:1737)
    at e.load (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11005)
    at a (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10302)
    at o._loadModule (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10432)
    at o._resolve (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:6:452)
    at o.defineModule (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:5:6144)
    at y (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:6:1825)
    at h (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2554)
    at Object.<anonymous> (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/server/node/server.main.js:140:86230)
    at Object.<anonymous> (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/server/node/server.main.js:176:2108)
    at e._createAndEvalScript (/usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2598)
    at /usr/local/lib/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2237
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/node_modules/code-server/lib/vscode/out/bootstrap-amd.js',
    '/usr/local/lib/node_modules/code-server/out/node/util.js',
    '/usr/local/lib/node_modules/code-server/out/node/cli.js',
    '/usr/local/lib/node_modules/code-server/out/node/entry.js'
  ],
  phase: 'loading',
  moduleId: 'yazl',
  neededBy: [ 'vs/base/node/zip' ]
}

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

There are other errors when not installing globally (such as a 404 error).

@U5B U5B added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Sep 1, 2022
@U5B U5B changed the title [Bug]: Missing dependencies (minimist & yazl) [Bug]: Missing dependencies (minimist, yauzl, yazl) Sep 1, 2022
@U5B
Copy link
Author

U5B commented Sep 1, 2022

Logs of code-server installation without --global
https://hastebin.com/mojarihica.sql

completely unrelated

@U5B
Copy link
Author

U5B commented Sep 1, 2022

Installing with yarn with code-server v4.6.1 gives the same error as the npm install.
However, installing with yarn for code-server v4.6.0 has no error.

(side note, npm for v4.6.0 and below don't work on my system due to node-gyp issues)

@ravi0the0sun
Copy link

Same error after installing code-server on my raspberry pi using npm

@jsjoeio
Copy link
Contributor

jsjoeio commented Sep 2, 2022

So it's not installing some dependencies 🤔 @edvincent any insight here since you're the npm expert?

I wonder if it's because of node-gyp issues or some native dependencies or something.

@jsjoeio jsjoeio added waiting-for-info Waiting for more information from submitter and removed bug Something isn't working triage This issue needs to be triaged by a maintainer labels Sep 2, 2022
@edvincent
Copy link
Contributor

@edvincent any insight here since you're the npm expert?

🤓😬😂

Are all of the installs using ARM & Windows? I don't have my RPi handy until this evening so I can't test myself...

But I saw similar errors in the past when some of the nested install commands would fail - and unfortunately the logging sometimes get swallowed.

Anyone can try to run npm install from inside the lib/vscode and lib/vscode/extensions folder where code-server got installed?

@edvincent
Copy link
Contributor

Ok able to reproduce on Ubuntu 22.04 on an ARM instance. Seems a problem with the underlying dependencies of lib/vscode, specifically xterm... Which I would have expected the shrinkwrap file to prevent...

ubuntu@ip-172-31-53-135:~/.nvm/versions/node/v16.17.0/lib/node_modules/code-server/lib/vscode$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: xterm-addon-search@0.10.0-beta.3
npm ERR! Found: xterm@4.20.0-beta.20
npm ERR! node_modules/xterm
npm ERR!   xterm@"4.20.0-beta.20" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer xterm@"^4.0.0" from xterm-addon-search@0.10.0-beta.3
npm ERR! node_modules/xterm-addon-search
npm ERR!   xterm-addon-search@"0.10.0-beta.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: xterm@4.19.0
npm ERR! node_modules/xterm
npm ERR!   peer xterm@"^4.0.0" from xterm-addon-search@0.10.0-beta.3
npm ERR!   node_modules/xterm-addon-search
npm ERR!     xterm-addon-search@"0.10.0-beta.3" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/ubuntu/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2022-09-02T17_25_45_732Z-debug-0.log

@edvincent
Copy link
Contributor

A short term hack/workaround: after the global install, go to the node_modules/code-server/lib/vscode directory directly and issue an npm install --legacy-peer-deps.

@edvincent
Copy link
Contributor

edvincent commented Sep 2, 2022

I suspect it's an issue with how the combo npm + semver computes peerDependencies...

Likely the semver carret plays differently with beta versions - i.e. doesn't really consider 4.20.0-betaXX as a valid version above 4.19.0?

@edvincent
Copy link
Contributor

edvincent commented Sep 2, 2022

> semver.satisfies('4.20.0', '^4.19.0')
true
> semver.satisfies('4.20.0-beta.20', '^4.19.0')
false
> semver.satisfies('4.20.0-beta.20', '^4.19.0', {includePrerelease: true})
true

And the explanation is the same that from #4918 and comes in https://github.com/npm/node-semver#prerelease-tags: pre-release tags are in a different "namespace".

Not sure why yarn (when we install everything during development) is not complaining about this...

@edvincent
Copy link
Contributor

I guess yarnpkg/yarn#3361 would explain that...

@edvincent
Copy link
Contributor

edvincent commented Sep 2, 2022

Relevant discussion for npm: npm/rfcs#397, but doesn't seem to go anywhere...

Brainstorming on next steps/fixes - happy to hear thoughts/other ideas:

  • After installing vscode, before doing the release, force an install of xterm@4.19.0 which will override the version brought by the yarn.lock from vscode (which is what eventually ends up in the release package we vend).
  • Edit the install script to issue a --legacy-peer-deps, which is going to revert to an older behavior which won't validate these peer-deps.
  • Try to force upstream (vscode) to go back to xterm@4.19.0 - though likely wouldn't work, as the next time they upgrade deps it'll bump to the next beta version....

And either way, need to sanity check why logging for the nested commands is not being bubbled up to the user...

@jsjoeio
Copy link
Contributor

jsjoeio commented Sep 2, 2022

Edit the install script to issue a --legacy-peer-deps, which is going to revert to an older behavior which won't validate these peer-deps.

I think we're going to try this for now to unblock installing via npm. see: #5533

Once CI passes, we'll publish 4.6.1-1 on npm manually to unblock people and allow us to publish to homebrew: Homebrew/homebrew-core#109430

Not sure which of those solutions are best. cc @code-asher

side note: @edvincent your investigation/notes are super thorough and you found all this super fast!!! Thank you!

@ravi0the0sun
Copy link

ravi0the0sun commented Sep 3, 2022

sudo yarn global code-server
yarn global v1.22.19
warning package.json: No license field
error Invalid subcommand. Try "add, bin, dir, ls, list, remove, upgrade, upgrade-interactive"
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
ravi@pi:~ $ sudo yarn global add code-server
yarn global v1.22.19
warning package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "code-server > @coder/logger@1.1.16" has unmet peer dependency "@google-cloud/logging@^4.5.2".
[4/4] Building fresh packages...
[2/2] ⠂ code-server
error /usr/local/share/.config/yarn/global/node_modules/code-server: Command failed.
Exit code: 1
Command: sh ./postinstall.sh
Arguments: 
Directory: /usr/local/share/.config/yarn/global/node_modules/code-server
Output:
Installing Code dependencies...
yarn.lock file not present, not running in development mode. use npm to install code-server!

Unfortunately I get error while installing code-server using yarn and it asks me to use npm to install it but when doing that I get

sudo npm install -g code-server
npm ERR! code 1
npm ERR! path /usr/lib/node_modules/code-server
npm ERR! command failed
npm ERR! command sh /tmp/postinstall-7802dc33.sh
npm ERR! Please pass --unsafe-perm to npm to install code-server
npm ERR! Otherwise the postinstall script does not have permissions to run
npm ERR! See https://docs.npmjs.com/misc/config#unsafe-perm
npm ERR! See https://stackoverflow.com/questions/49084929/npm-sudo-global-installation-unsafe-perm

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-09-03T02_25_12_938Z-debug-0.log

seems to be an error with the postinstall.sh script i can use the --unsafe-perm flag to install it properly but it ends up giving me the error of missing dependencies.

@mobinmohammadi10
Copy link

I tried installing this three packages with npm globally and it seems the problem is solved
sudo npm install -g @microsoft/1ds-core-js minimist yauzl
i hope this will solve the problem

@jsjoeio jsjoeio added the high-priority This issue needs to be resolved ASAP label Oct 20, 2022
@jsjoeio jsjoeio added this to the On Deck milestone Oct 20, 2022
@realthk
Copy link

realthk commented Jan 21, 2023

I tried installing this three packages with npm globally and it seems the problem is solved sudo npm install -g @microsoft/1ds-core-js minimist yauzl i hope this will solve the problem

Yes, thanks! On FreeBSD also had to add
vscode-proxy-agent @vscode/ripgrep vscode-regexpp xterm-headless spdlog @parcel/watcher
the same way because of some warnings, and still have
[IPC Library: Pty Host] Error: Platform not supported
error, so no terminal available, but the editor works fine, that's the point.

@mrexodia
Copy link

I got an error installing spdlog:

C:\Users\Admin>npm i -g spdlog
npm ERR! code 1
npm ERR! path C:\Users\Admin\AppData\Roaming\npm\node_modules\spdlog
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
npm ERR!   main.cc
npm ERR! C:\Users\Admin\AppData\Local\node-gyp\Cache\16.17.0\include\node\node.h(73,10): fatal  error C1083: Cannot open include file: 'v8.h': No such file or directory [C:\Users\Admin\AppData\Roaming\npm\node_modules\spdlog\build\spdlog.vcxproj]

It was resolved by deleting %LocalAppData%/node-gyp/Cache (nodejs/node-gyp#2482 (comment))

@Initial-heart-1
Copy link
Contributor

Initial-heart-1 commented Mar 4, 2023

Exactly the same problem was found on Windows Server 2022. code-server@4.10.0
After deployment was complete, I found 4.10.1, which had just been updated, but when I reviewing CHANGELOG I did not find anything related to it.
Env. TencentCloud CVM Windows Server 2022 Datacenter X64 Simplified Chinese

@Initial-heart-1
Copy link
Contributor

I tried to run:

npm install --global @microsoft/1ds-core-js minimist yauzl

and restart device, but it doesn't working.

@hweeks
Copy link

hweeks commented Mar 20, 2023

@Initial-heart-1 you missed quite a few packages try:

npm i -g @microsoft/1ds-core-js minimist yauzl yazl spdlog

I think this is coming from y'alls lack of understanding of the new yarn and some things. right now if you're on a corepack enabled node version, anything past 16.17.0, and use a non yarn 1.22.19 install it all blows up. if this is your current hell hole here's how you can make this package run as if yarn 1 is the only yarn that exists:

export const installCodeServer = () => {
  spawnSync('corepack', ['yarn@1.22.19', 'global', 'add', 'code-server@4.11.0'])
  // without these globals it doesn't work
  spawnSync('corepack', ['yarn@1.22.19', 'global', 'add', '@microsoft/1ds-core-js', 'minimist', 'yauzl', 'yazl', 'spdlog'])
  process.stdout.write('code-server version 4.11.0 installed\n')
}

@beaclnd
Copy link

beaclnd commented Mar 20, 2023

After installing code-server(v4.11.0) on my Raspberry Pi 3(OS: Raspbian GNU/Linux 11) with npm(node v16.16.0): npm i -g code-server --unsafe-perm, i installed the missing libraries with the following commands:

npm i -g @microsoft/1ds-core-js minimist yauzl yazl spdlog xterm-headless
sudo apt install libsecret-1-dev

then changed into the node_modules/code-server/lib/vscode directory to run the command:

npm i --legacy-peer-deps

Eventually code-server works as expected.

@fishbar
Copy link

fishbar commented May 6, 2023

v4.12.0 still have this problem, it need to install vscode's node_modules manually:

cd path_to_global_node_modules/codeserver/lib/vscode && npm i . --production --force

after installed, code-server can start up successfully.

seams the npm post install script should add this step

@Initial-heart-1
Copy link
Contributor

Oh, not so good...I seem to have been successful in the solution to this problem, because it has indeed worked well on my server for a while, but I seem to forget what I did...
Anyway, I'm running code-server@4.10.0 on my server (Windows 10 Pro).

@kwekewk
Copy link

kwekewk commented Jul 27, 2023

info? it still persist on latest version

@TimothyBruce
Copy link

Issue persists September 10, 2023. Any updates?

@danchitnis
Copy link

Please use docker and code-server-python. It is tested on RPI4 Pi OS 64-bit. For 32-bit, you have to build the image manually. You can modify the base image to work with other frameworks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high-priority This issue needs to be resolved ASAP waiting-for-info Waiting for more information from submitter
Projects
None yet
Development

No branches or pull requests