Al: A JavaScript error occurred in the main process while opening Visual Studio Code

Created on 17 Jan 2017  路  14Comments  路  Source: microsoft/AL

I stopped my VM (deallocated) and started again.
getting below error while opening Visual Studio Code
vscode

Most helpful comment

This error just occurred after it prompted me to update VSCode.

Uncaught Exception:
Error: Cannot find module 'C:\Program Files (x86)\Microsoft VS Code\resources\app\out\main'
    at Module._resolveFilename (module.js:470:15)
    at Function.Module._resolveFilename (C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\common\reset-search-paths.js:35:12)
    at Function.Module._load (module.js:418:25)
    at Object.<anonymous> (C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\browser\init.js:171:8)
    at Object.<anonymous> (C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\browser\init.js:173:3)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

All 14 comments

restarting the vm solved above problem but now getting "No task runner configured." while building the package.
status.txt

I had this previously and here was the solution.

https://github.com/Microsoft/AL/issues/45.

AL Extension (al-0.2.6084.vsx) is already installed under extensions.
My VM is not restarting.
what else should I do instead of creating new image?

Easiest thing is to delete the VM and create a new one.
I would however like to know what exactly went wrong, so if it isn't too much to ask, you can send the remote desktop info (url, username and password) to me (freddyk at microsoft dot com) and I will have a look - otherwise, just delete it and I will see if I can repro myself.

It was bit late freddy. I have already deleted VM and created new one.
I will provide you if it happens again.
I guess, you can create new VM and deallocate it and start again. it should replicate.

Let's reopen if this problem occurs again.

This error just occurred after it prompted me to update VSCode.

Uncaught Exception:
Error: Cannot find module 'C:\Program Files (x86)\Microsoft VS Code\resources\app\out\main'
    at Module._resolveFilename (module.js:470:15)
    at Function.Module._resolveFilename (C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\common\reset-search-paths.js:35:12)
    at Function.Module._load (module.js:418:25)
    at Object.<anonymous> (C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\browser\init.js:171:8)
    at Object.<anonymous> (C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\browser\init.js:173:3)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

This looks like VS Code issue, you can try reporting it at http://github.com/microsoft/vscode/issues

@sghaleb1 getting the same error- VSCode prompted me to update it and I allowed it to by mistake. I clicked cancel during the process and it spat out that error.

[Window Title]
Error

[Main Instruction]
A JavaScript error occurred in the main process

[Content]
Uncaught Exception:
Error: Cannot find module 'D:\Program Files (x86)\Microsoft VS Code\resources\app\out\main'
at Module._resolveFilename (module.js:470:15)
at Function.Module._resolveFilename (D:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\common\reset-search-paths.js:35:12)
at Function.Module._load (module.js:418:25)
at Object. (D:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\browser\init.js:171:8)
at Object. (D:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\browser\init.js:173:3)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)

[OK]

image

I too got same error after updating visual studio code
vs error

I too got the same issue after updating.

Solution

My solution is to re-download a copy to overwrite the current directory, the previous configuration is still valid

Try uninstalling and the installing the Code.
This helped me in fixing the error.

Was this page helpful?
0 / 5 - 0 ratings