~$ code i.txt
Loading "minimist" failed
Error: Cannot find module 'minimist'
Require stack:
- /home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at r (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:3:98)
at n.load (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:2:1637)
at p.load (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:1:10823)
at l (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:3:9338)
at Object.errorback (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:3:9457)
at p.triggerErrorback (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:1:11117)
at /home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:1:10868
at n.load (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:2:1654)
at p.load (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:1:10823)
at l (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:3:9338)
at f._loadModule (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:3:9466)
at f._resolve (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:4:452)
at f.defineModule (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:3:5561)
at _ (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:4:1741)
at m (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:2:2448)
at Object.<anonymous> (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/vs/server/node/server.cli.js:31:110931)
at Object.<anonymous> (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/vs/server/node/server.cli.js:34:9301)
at n._createAndEvalScript (/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:2:2492)
at /home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js:2:2133
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/out/server-cli.js'
],
phase: 'loading',
moduleId: 'minimist',
neededBy: [ 'vs/platform/environment/node/argv' ]
}
Here are the modules that depend on it:
解决方法:
先删除linux系统里旧的vscode文件
rm -rf /home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729
然后重新运行vs code命令即会下载新文件
$ code i.txt
Updating VS Code Server to version f1e16e1e6214d7c44d078b1f0607b2388f29d729
Removing previous installation...
Installing VS Code Server for Linux legacy-x64 (f1e16e1e6214d7c44d078b1f0607b2388f29d729)
Downloading: 100%
Unpacking: 100%
Unpacked 1707 files and folders to /home/victor/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729.
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |