Since today, I can't open vs code on both App shortcut and Terminal.
When I try to run any command related to VS Code like code
, code --version
and etc. I get this error:
Loading "minimist" failed
Error: EIO: i/o error, read
at Object.readSync (fs.js:592:3)
at Object.p.internalModuleReadJSON (electron/js2c/asar_bundle.js:5:11493)
at Object.read (internal/modules/package_json_reader.js:21:52)
at readPackage (internal/modules/cjs/loader.js:253:36)
at resolveExports (internal/modules/cjs/loader.js:436:15)
at Function.Module._findPath (internal/modules/cjs/loader.js:479:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:921:27)
at Module._load (internal/modules/cjs/loader.js:779:27)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at require (internal/modules/cjs/helpers.js:88:18)
at r (/snap/code/83/usr/share/code/resources/app/out/vs/loader.js:5:101)
at e.load (/snap/code/83/usr/share/code/resources/app/out/vs/loader.js:4:1723)
at e.load (/snap/code/83/usr/share/code/resources/app/out/vs/loader.js:3:10695)
at d (/snap/code/83/usr/share/code/resources/app/out/vs/loader.js:5:10300)
at Object.errorback (/snap/code/83/usr/share/code/resources/app/out/vs/loader.js:5:10421)
at e.triggerErrorback (/snap/code/83/usr/share/code/resources/app/out/vs/loader.js:3:11059)
at /snap/code/83/usr/share/code/resources/app/out/vs/loader.js:3:10765
at e.load (/snap/code/83/usr/share/code/resources/app/out/vs/loader.js:4:1740)
at e.load (/snap/code/83/usr/share/code/resources/app/out/vs/loader.js:3:10695)
at d (/snap/code/83/usr/share/code/resources/app/out/vs/loader.js:5:10300)
at i._loadModule (/snap/code/83/usr/share/code/resources/app/out/vs/loader.js:5:10430)
at i._resolve (/snap/code/83/usr/share/code/resources/app/out/vs/loader.js:6:452)
at i.defineModule (/snap/code/83/usr/share/code/resources/app/out/vs/loader.js:5:6142)
at v (/snap/code/83/usr/share/code/resources/app/out/vs/loader.js:6:1702)
at g (/snap/code/83/usr/share/code/resources/app/out/vs/loader.js:4:2557)
at Object.<anonymous> (/snap/code/83/usr/share/code/resources/app/out/vs/code/node/cli.js:9:115415)
at Object.<anonymous> (/snap/code/83/usr/share/code/resources/app/out/vs/code/node/cli.js:12:18613)
at e._createAndEvalScript (/snap/code/83/usr/share/code/resources/app/out/vs/loader.js:4:2601)
at /snap/code/83/usr/share/code/resources/app/out/vs/loader.js:4:2240
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3) {
errno: -5,
syscall: 'read',
code: 'EIO',
phase: 'loading',
moduleId: 'minimist',
neededBy: [ 'vs/platform/environment/node/argv' ]
}
Here are the modules that depend on it:
[ 'vs/platform/environment/node/argv' ]
CodePudding user response:
Try to install the minimist npm package globally with
npm install -g minimist
CodePudding user response:
Accidentally removed some packages. Solved via reinstalling VS Code.