Whenever I attempt to open VS Code, I am seeing the following error:
Error Message
Here is the transcript:
Uncaught Exception:
Error: Cannot find module 'C:\Program Files\Microsoft VS Code\resources\app\out\main'
Require stack:
-
at Module._resolveFilename (internal/modules/cjs/loader.js:627:15)
at Function.Module._resolveFilename (C:\Program Files\Microsoft VS Code\resources\electron.asar\common\reset-search-path.js:46:16)
at Function.Module._load (internal/modules/cjs/loader.js:531:27)
at Object.<anonymous> (C:\Program Files\Microsoft VS Code\resources\electron.asar\browser\init.js:191:12)
at Module._compile (internal/modules/cjs/loader.js:645:32)
at Function.Module._load (internal/modules/cjs/loader.js:560:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:850:10)
at internal/main/run_main_module.js:17:11
I am unable to open any projects in VS Code; any attempt throws the same error. I was running VS Code in the same session without any issues prior to receiving this error.
Related
in my company laptop they did a central update on the vscode version and from one day to the other my code does not even start. (by company laptop means I don't really have admin access and can only try a few things to debug this)
I wanted to know how can I debug this because maybe is some additional plugin or something I might have that might be causing this problem.
It seems is not affecting other users so they don't really know what much can be.
anyway this is the stacktrace when I launch it, either from terminal or from the launcher.
Z:\>code
Error: Cannot find module 'iconv-lite'
Require stack:
- C:\Program Files\Microsoft VS Code\resources\app\out\bootstrap-amd.js
- C:\Program Files\Microsoft VS Code\resources\app\out\cli.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:844:17)
at Module._load (internal/modules/cjs/loader.js:737:27)
at Function.Module._load (electron/js2c/asar.js:769:28)
at Module.require (internal/modules/cjs/loader.js:899:19)
at require (internal/modules/cjs/helpers.js:74:18)
at t.load (C:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:16:119)
at e.load (C:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:13:586)
at i (C:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:29:189)
at Object.errorback (C:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:29:313)
at e.triggerErrorback (C:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:13:955)
at C:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:13:659
at ReadFileContext.callback (C:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:16:494)
at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:239:13) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Program Files\\Microsoft VS Code\\resources\\app\\out\\bootstrap-amd.js',
'C:\\Program Files\\Microsoft VS Code\\resources\\app\\out\\cli.js'
],
phase: 'loading',
moduleId: 'iconv-lite',
neededBy: [ 'vs/base/node/encoding' ]
}
Error: Cannot find module 'vscode-minimist'
Require stack:
- C:\Program Files\Microsoft VS Code\resources\app\out\bootstrap-amd.js
- C:\Program Files\Microsoft VS Code\resources\app\out\cli.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:844:17)
at Module._load (internal/modules/cjs/loader.js:737:27)
at Function.Module._load (electron/js2c/asar.js:769:28)
at Module.require (internal/modules/cjs/loader.js:899:19)
at require (internal/modules/cjs/helpers.js:74:18)
at t.load (C:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:16:119)
at e.load (C:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:13:586)
at i (C:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:29:189)
at Object.errorback (C:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:29:313)
at e.triggerErrorback (C:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:13:955)
at C:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:13:659
at ReadFileContext.callback (C:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:16:494)
at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:239:13) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Program Files\\Microsoft VS Code\\resources\\app\\out\\bootstrap-amd.js',
'C:\\Program Files\\Microsoft VS Code\\resources\\app\\out\\cli.js'
],
phase: 'loading',
moduleId: 'vscode-minimist',
neededBy: [ 'vs/platform/environment/node/argv' ]
}
Any idea what I might try? it's probably some configuration issue on my side.
I believe this to be the version of the latest update:
https://code.visualstudio.com/updates/v1_49
I'm now trying to run a portable version of vscode without plugins to try and figure out what the problem is, if interesting this are the extensions I've found in my user profile folder:
ms-azuretools.vscode-docker-1.1.0
ms-vscode.vscode-typescript-tslint-plugin-1.2.3
naco-siren.gradle-language-0.2.3
richardwillis.vscode-gradle-2.4.14
shd101wyy.markdown-preview-enhanced-0.5.13
tht13.html-preview-vscode-0.2.5
zxh404.vscode-proto3-0.4.2
abusaidm.html-snippets-0.2.1
angular.ng-template-0.1001.0
dbaeumer.jshint-0.10.21
dbaeumer.vscode-eslint-2.1.1
eamodio.gitlens-10.2.2
ecmel.vscode-html-css-0.2.3
esbenp.prettier-vscode-5.5.0
hookyqr.beautify-1.5.0
marlon407.code-groovy-0.1.2
I am not sure if this is a Visual Studio Code issue or Dafny issue as I am new to both.
Loaded Visual Studio Code then from within Visual Studio Code loaded the extension for Dafny.
I get the following error message and know that you can tell Visual Studio explicitly where mono is to be found but I do not know where mono is?
verify all1
all verifyfile:///Users/dstr/GoogleDrive/Teaching/SWEN324/FreshStart/fresh.dfy
The verifyer process ended with code 0
Local: 2.3.0
Remote:2.3.0
events.js:180
throw er; // Unhandled 'error' event
^
Error: spawn mono EAGAIN
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:77:11) {
errno: 'EAGAIN',
code: 'EAGAIN',
syscall: 'spawn mono',
path: 'mono',
spawnargs: [
'/Users/dstr/.vscode/extensions/correctnesslab.dafny-vscode-0.17.2/dafny/dafny/DafnyServer.exe'
]
}
The problem was solved by turning off the Automatic counter example generator. In the settings for the dafny extension.
I am trying to debug vscode source code from vscode itself. While I am trying to debug from the 'Launch VS Code' and press F5, it gives the following error.
Loading "winreg" failed
loader.js:224
Error: Cannot find module 'winreg'
loader.js:227
at Module._resolveFilename (module.js:470:15)
at Function.Module._resolveFilename (c:\Users\oguz\Documents\workspace\vscode\.build\electron\resources\electron.asar\common\reset-search-paths.js:35:12)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at nodeRequire (file:///C:/Users/oguz/Documents/workspace/vscode/out/vs/loader.js:1642:28)
at NodeScriptLoader.load (file:///C:/Users/oguz/Documents/workspace/vscode/out/vs/loader.js:703:39)
at OnlyOnceScriptLoader.load (file:///C:/Users/oguz/Documents/workspace/vscode/out/vs/loader.js:549:37)
at loadNextPath (file:///C:/Users/oguz/Documents/workspace/vscode/out/vs/loader.js:1401:41)
at Object.errorback (file:///C:/Users/oguz/Documents/workspace/vscode/out/vs/loader.js:1409:25)
Detail:
loader.js:225
Error: Cannot find module 'winreg'
loader.js:225
Here are the modules that depend on it:
Array(1) ["vs/platform/telemetry/node/workbenchCommonProperti…"]
I've found my own solution. Npm requires winreg module but it could not find it. So, I installed it manually by npm install winreg command. Now I can debug vscode.
https://www.npmjs.com/package/winreg
I am starting to use protractor using eclipse, configured everything, nodejs, protractor, webdriver, but while running protractor with eclipse I am facing below issue with protractor.
Can someone please help me.
Environment details:
C:\Users\User>protractor --version
Version 5.1.1
C:\Users\User>npm --version
3.10.10
C:\Users\User>npm-windows-upgrade
'npm-windows-upgrade' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\User>node -v
v6.10.3
Error facing
**C:\Users(user)\AppData\Roaming\npm\node_modules\webdriver-manager\built\lib\cli\logger.js:66
info(...msgs) {
^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users(user)\AppData\Roaming\npm\node_modules\we
bdriver-manager\built\lib\cli\index.js:8:10)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)**
The error suggests that there is a error in parsing the Javascript of webdriver-manager. webdriver-manager was updated to ES6 (and that's why we need Node 6+) and threw the ... errors in the past for older version of node.
Based on that I would say that Eclipse is running on an older version. After searching the webdriver-manager git I found this issue. I think it matches your problem and also gives you the steps to check which version of node Eclipse is using.
Hope it helps
I've just updated to VS Code 1.11.2 on Windows 8.1 and when I open existing projects, files are shown in the explorer but an attempt to open any of them just shows a blank window with a blue "progress" bar endlessly scrolling across the top of the window. Creating and editing new files works. Any ideas?
In the console of the Developer Tools is the following:
[uncaught exception]: Error: EPERM: operation not permitted, read
Uncaught Error: EPERM: operation not permitted, read
[uncaught exception]: Error: EPERM: operation not permitted, open 'd:\Dev\AngularJS2\translation-editor\app\editor\translation-editor.component.html'
Error: EPERM: operation not permitted, open 'd:\Dev\AngularJS2\translation-editor\app\editor\translation-editor.component.html'
at Error (native)
Uncaught Error: EPERM: operation not permitted, open 'd:\Dev\AngularJS2\translation-editor\app\editor\translation-editor.component.html'
Workbench did not finish loading in 10 seconds, that might be a problem that should be reported.