Open
Description
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
- Install code-server by doing
npm --global i code-server --unsafe-perm
- Startup code-server with no errors
- 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).
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
[-][Bug]: Missing dependencies (minimist & yazl)[/-][+][Bug]: Missing dependencies (minimist, yauzl, yazl)[/+]U5B commentedon Sep 1, 2022
Logs of code-server installation without--global
https://hastebin.com/mojarihica.sqlcompletely unrelated
U5B commentedon 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 commentedon Sep 2, 2022
Same error after installing code-server on my raspberry pi using npm
jsjoeio commentedon 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.
edvincent commentedon Sep 2, 2022
🤓😬😂
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 thelib/vscode
andlib/vscode/extensions
folder wherecode-server
got installed?edvincent commentedon Sep 2, 2022
Ok able to reproduce on Ubuntu 22.04 on an ARM instance. Seems a problem with the underlying dependencies of
lib/vscode
, specificallyxterm
... Which I would have expected the shrinkwrap file to prevent...edvincent commentedon Sep 2, 2022
A short term hack/workaround: after the global install, go to the
node_modules/code-server/lib/vscode
directory directly and issue annpm install --legacy-peer-deps
.edvincent commentedon Sep 2, 2022
I suspect it's an issue with how the combo
npm
+semver
computespeerDependencies
...xterm-addon-search@0.10.0-beta.3
declares"xterm": "^4.0.0"
as a peer dependency - see package.jsonxterm@4.20.0-beta.20
- see npm-shrinkwrap.jsonLikely the
semver
carret plays differently with beta versions - i.e. doesn't really consider4.20.0-betaXX
as a valid version above4.19.0
?edvincent commentedon Sep 2, 2022
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...12 remaining items
mrexodia commentedon Jan 23, 2023
I got an error installing
spdlog
:It was resolved by deleting
%LocalAppData%/node-gyp/Cache
(nodejs/node-gyp#2482 (comment))Initial-heart-1 commentedon 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 commentedon Mar 4, 2023
I tried to run:
and restart device, but it doesn't working.
hweeks commentedon Mar 20, 2023
@Initial-heart-1 you missed quite a few packages try:
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:
beaclnd commentedon 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:then changed into the
node_modules/code-server/lib/vscode
directory to run the command:Eventually code-server works as expected.
fishbar commentedon May 6, 2023
v4.12.0 still have this problem, it need to install vscode's node_modules manually:
after installed, code-server can start up successfully.
seams the npm post install script should add this step
Initial-heart-1 commentedon May 6, 2023
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 commentedon Jul 27, 2023
info? it still persist on latest version
TimothyBruce commentedon Sep 11, 2023
Issue persists September 10, 2023. Any updates?
danchitnis commentedon Nov 3, 2023
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.
code-asher commentedon Jul 11, 2024
Does this still persist in the latest version? I am not sure there are any errors on our end, we already install modules as part of the postinstall:
code-server/ci/build/npm-postinstall.sh
Lines 145 to 147 in 6a14070