Visual studio code ошибка node

With a downloaded and installed version of Visual Studio Code 1.2.1, and a 64bit version of node.exe msi placed in my working directory (I am assuming that is correct), how do we add node and npm command line tools to be on our PATH? I am confused in understanding that statement. Where and how do we implement that? I am quoting this requirement directly from the top of this resource page — https://code.visualstudio.com/Docs/runtimes/nodejs

As a result of my current situation, I set a break-point in an app.js file. And when I hit F5, it tells me…

Cannot find runtime 'node' on PATH 

I am completely lost in understanding and fixing this issue in Visual Studio Code.

asked Jun 14, 2016 at 22:30

klewis's user avatar

klewisklewis

7,52915 gold badges63 silver badges102 bronze badges

5

On OSX and VSCode 1.56.2 all I had to do was to close and restart VSCode and the problem went away.

Before you despair git that a try.

answered Dec 18, 2018 at 17:39

David Dehghan's user avatar

David DehghanDavid Dehghan

22.3k10 gold badges107 silver badges95 bronze badges

12

first run below commands as super user
sudo code . --user-data-dir='.'
it will open the visual code studio import the folder of your project and set the launch.json as below

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "program": "${workspaceFolder}/app/release/web.js",
            "outFiles": [
                "${workspaceFolder}/**/*.js"
            ],
            "runtimeExecutable": "/root/.nvm/versions/node/v8.9.4/bin/node"
        }
    ]
}

path of runtimeExecutable will be output of "which node" command.

Run the server in debug mode.

starball's user avatar

starball

21.2k7 gold badges47 silver badges256 bronze badges

answered Jul 19, 2018 at 13:33

anuj rana's user avatar

anuj ranaanuj rana

1,1021 gold badge7 silver badges2 bronze badges

2

To follow up, I just ran into this as well. When I installed Node.js there was an option that said Add to PATH (Available After Restart). Seems like Windows just needs a restart to make things work.

answered Jul 16, 2016 at 18:25

Michael P. Scott's user avatar

4

Quick fix that works for me. Navigate to the root directory of your folder from command line (cmd). then once you are on your root directory, type:

code . 

Then, press enter. Note the «.», don’t forget it. Now try to debug and see if you get the same error.

Afzaal Ahmad Zeeshan's user avatar

answered Mar 14, 2017 at 14:59

Edson H Philippe's user avatar

3

Apply a Default Node Version via NVM

I’m using macOS Big Sur and setting the default version via nvm fixed this for me by running this command: nvm alias default 16 (change 16 to the version you want as your default).

Note that node worked fine in the terminal for me (both with zsh and bash) but not when running via the vscode debugger and I already had the following config in both ~/.zshrc and ~/.bash_profile to load in nvm:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

It wasn’t until I set the default Node version that vscode would launch node targets just fine.

answered Apr 9, 2021 at 23:40

Sam's user avatar

SamSam

27k12 gold badges75 silver badges102 bronze badges

4

I did which node on my terminal:
/usr/local/bin/node

and then i added
"runtimeExecutable": "/usr/local/bin/node" in my json file.

answered May 21, 2019 at 15:46

ASHISH R's user avatar

ASHISH RASHISH R

4,0611 gold badge20 silver badges16 bronze badges

2

For me, the node binary is in PATH and I can run it from the terminal (iTerm or Terminal), and the Terminal apps are set to use zsh

If you are on a Mac, with iTerm and Zsh, please use the following VSCode settings for Node to work.

After this change, you can get rid of this line from your launch.json config file. (the debug settings in VSCode)

    "runtimeExecutable": "/usr/local/bin/node"

If this doesn’t work, make sure you choose the default shell as zsh. To do this,

  • Open the command palette using Cmd+Shift+P

  • Look for the Terminal: Select Default Shell command
    enter image description here

  • Select zsh from the options
    enter image description here

answered Jun 11, 2020 at 18:26

Aditya Vikas Devarapalli's user avatar

So node got kicked out of path. you can do

       SET PATH=C:\Program Files\Nodejs;%PATH%

Or simply reinstall node to fix this. which ever you think is easiest for you

answered Jun 14, 2016 at 22:33

irimawi's user avatar

irimawiirimawi

3681 silver badge9 bronze badges

3

I had a similar issue with zsh and nvm on Linux, I fixed it by adding nvm initialization script in ~/.profile and restart login session like this

export NVM_DIR="$HOME/.nvm" 
 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm 
 [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"

answered Mar 19, 2019 at 10:54

salamaashoush's user avatar

Had the same issue and in my case it was a problem with a vs code extension. Try running code as:

$ code --disable-extensions

Once in the editor, I ran my program in the debug mode and worked, and then started code with

$ code

And it continued working fine.

Hope it works for you.

Duck Dodgers's user avatar

Duck Dodgers

3,4198 gold badges29 silver badges43 bronze badges

answered Jan 3, 2019 at 12:15

Sebastian's user avatar

SebastianSebastian

3013 silver badges4 bronze badges

0

I use /bin/zsh, and I changed vscode to do the same, but somehow vscode still use the path from /bin/bash. So I created a .bash_profile file with node location in the path.

Simply run in terminal:

echo "PATH=$PATH
export \$PATH" >> ~/.bash_profile

Restart vscode, and it will work.

answered Nov 3, 2020 at 9:53

Shl's user avatar

ShlShl

3,1701 gold badge17 silver badges16 bronze badges

Just relaunch your project from the termial

e.g. yourprojectdir code .

answered Dec 5, 2022 at 7:52

Shashank's user avatar

I also ran into this error. Restart the PC works for me.

answered Feb 17, 2017 at 13:42

Umair Akbar's user avatar

Umair AkbarUmair Akbar

5785 silver badges11 bronze badges

1

Do not launch the VS code from the start menu separately. Use

$Code .

command to launch VS code. Now, create your file with the extension .js and Start debugging (F5) it. It will be executed.

Otherwise, restart your system and follow the same process.

answered Jul 10, 2018 at 10:31

Sourav Debnath's user avatar

The cause for me receiving this error was trying the new pre-release VSCode JS debugger.

If you opted in, change via User settings:

    "debug.javascript.usePreview": true|false

Everything in my normal configuration and integrated terminal was correct and finding executables. I wasted a lot of time trying other things!

answered Apr 20, 2020 at 19:41

Sean Patrick Murphy's user avatar

3

(CMD+SHIFT+P) Shell command: Install ‘code’ command in PATH

should do the trick!

answered Jul 26, 2021 at 15:12

Tellisense's user avatar

TellisenseTellisense

1,86812 silver badges11 bronze badges

1

i resolved this problem after disable ESLint extention.

answered Apr 19, 2020 at 8:11

Kasra Karami's user avatar

I am on OSX, this did not work for me:

code . --user-data-dir='.'

but this DID work:

code . -data-dir='.'

answered Apr 19, 2020 at 10:23

Pauls Bebris's user avatar

This is the solution according to the VS code debugging page.
This worked for my setup on Windows 10.

"version": "0.2.0",
"configurations": [
{
    "type": "node",
    "request": "launch",
    "name": "Launch Program",
    "program": "${file}"
}

The solution is here:

https://code.visualstudio.com/docs/editor/debugging

Here is the launch configuration generated for Node.js debugging

answered Jun 3, 2020 at 19:39

D.L's user avatar

D.LD.L

4,3555 gold badges23 silver badges47 bronze badges

I also encountered this issue. Did the following and it got fixed.

  1. Open your computer terminal (not VSCode terminal) and type node —version to ensure you have node installed. If not, then install node using nvm.
  2. Then head to your bash file (eg .bashrc, .bash_profile, .profile) and add the PATH:
 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm 
 [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
  1. If you have multiple bash files, you ensure to add the PATH to all of them.
  2. Restart your VSCode terminal and it should be fine.

answered Jun 9, 2020 at 4:46

Obinna Nnenanya's user avatar

Mine was more project specific. We use «Auto Reload» to run our launch.json for the backend. The error states the file path of the runtimeExecutable and allows you to open launch.json. In my launch.json case:

"runtimeExecutable": "${workspaceFolder}/functions/node_modules/.bin/nodemon"

I tried the restarts and answers here originally but no luck, so I manually explored into my functions/node_modules folder and realized .bin was missing. I used my terminal to path into functions like so:

   cd functions

   Terminal directory path example: ( ~/OneDrive/Desktop/{project dir covered}/{project dir covered}/functions )

Then I did an npm install using npm i, and now everything is back to normal. Keep in mind, most of these answers are general fixes. If your situtation is more specific, be sure to break it down from the start. Hope this might help others!

answered Jun 22, 2022 at 20:14

Snake780's user avatar

With a downloaded and installed version of Visual Studio Code 1.2.1, and a 64bit version of node.exe msi placed in my working directory (I am assuming that is correct), how do we add node and npm command line tools to be on our PATH? I am confused in understanding that statement. Where and how do we implement that? I am quoting this requirement directly from the top of this resource page — https://code.visualstudio.com/Docs/runtimes/nodejs

As a result of my current situation, I set a break-point in an app.js file. And when I hit F5, it tells me…

Cannot find runtime 'node' on PATH 

I am completely lost in understanding and fixing this issue in Visual Studio Code.

asked Jun 14, 2016 at 22:30

klewis's user avatar

klewisklewis

7,52915 gold badges63 silver badges102 bronze badges

5

On OSX and VSCode 1.56.2 all I had to do was to close and restart VSCode and the problem went away.

Before you despair git that a try.

answered Dec 18, 2018 at 17:39

David Dehghan's user avatar

David DehghanDavid Dehghan

22.3k10 gold badges107 silver badges95 bronze badges

12

first run below commands as super user
sudo code . --user-data-dir='.'
it will open the visual code studio import the folder of your project and set the launch.json as below

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "program": "${workspaceFolder}/app/release/web.js",
            "outFiles": [
                "${workspaceFolder}/**/*.js"
            ],
            "runtimeExecutable": "/root/.nvm/versions/node/v8.9.4/bin/node"
        }
    ]
}

path of runtimeExecutable will be output of "which node" command.

Run the server in debug mode.

starball's user avatar

starball

21.2k7 gold badges47 silver badges256 bronze badges

answered Jul 19, 2018 at 13:33

anuj rana's user avatar

anuj ranaanuj rana

1,1021 gold badge7 silver badges2 bronze badges

2

To follow up, I just ran into this as well. When I installed Node.js there was an option that said Add to PATH (Available After Restart). Seems like Windows just needs a restart to make things work.

answered Jul 16, 2016 at 18:25

Michael P. Scott's user avatar

4

Quick fix that works for me. Navigate to the root directory of your folder from command line (cmd). then once you are on your root directory, type:

code . 

Then, press enter. Note the «.», don’t forget it. Now try to debug and see if you get the same error.

Afzaal Ahmad Zeeshan's user avatar

answered Mar 14, 2017 at 14:59

Edson H Philippe's user avatar

3

Apply a Default Node Version via NVM

I’m using macOS Big Sur and setting the default version via nvm fixed this for me by running this command: nvm alias default 16 (change 16 to the version you want as your default).

Note that node worked fine in the terminal for me (both with zsh and bash) but not when running via the vscode debugger and I already had the following config in both ~/.zshrc and ~/.bash_profile to load in nvm:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

It wasn’t until I set the default Node version that vscode would launch node targets just fine.

answered Apr 9, 2021 at 23:40

Sam's user avatar

SamSam

27k12 gold badges75 silver badges102 bronze badges

4

I did which node on my terminal:
/usr/local/bin/node

and then i added
"runtimeExecutable": "/usr/local/bin/node" in my json file.

answered May 21, 2019 at 15:46

ASHISH R's user avatar

ASHISH RASHISH R

4,0611 gold badge20 silver badges16 bronze badges

2

For me, the node binary is in PATH and I can run it from the terminal (iTerm or Terminal), and the Terminal apps are set to use zsh

If you are on a Mac, with iTerm and Zsh, please use the following VSCode settings for Node to work.

After this change, you can get rid of this line from your launch.json config file. (the debug settings in VSCode)

    "runtimeExecutable": "/usr/local/bin/node"

If this doesn’t work, make sure you choose the default shell as zsh. To do this,

  • Open the command palette using Cmd+Shift+P

  • Look for the Terminal: Select Default Shell command
    enter image description here

  • Select zsh from the options
    enter image description here

answered Jun 11, 2020 at 18:26

Aditya Vikas Devarapalli's user avatar

So node got kicked out of path. you can do

       SET PATH=C:\Program Files\Nodejs;%PATH%

Or simply reinstall node to fix this. which ever you think is easiest for you

answered Jun 14, 2016 at 22:33

irimawi's user avatar

irimawiirimawi

3681 silver badge9 bronze badges

3

I had a similar issue with zsh and nvm on Linux, I fixed it by adding nvm initialization script in ~/.profile and restart login session like this

export NVM_DIR="$HOME/.nvm" 
 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm 
 [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"

answered Mar 19, 2019 at 10:54

salamaashoush's user avatar

Had the same issue and in my case it was a problem with a vs code extension. Try running code as:

$ code --disable-extensions

Once in the editor, I ran my program in the debug mode and worked, and then started code with

$ code

And it continued working fine.

Hope it works for you.

Duck Dodgers's user avatar

Duck Dodgers

3,4198 gold badges29 silver badges43 bronze badges

answered Jan 3, 2019 at 12:15

Sebastian's user avatar

SebastianSebastian

3013 silver badges4 bronze badges

0

I use /bin/zsh, and I changed vscode to do the same, but somehow vscode still use the path from /bin/bash. So I created a .bash_profile file with node location in the path.

Simply run in terminal:

echo "PATH=$PATH
export \$PATH" >> ~/.bash_profile

Restart vscode, and it will work.

answered Nov 3, 2020 at 9:53

Shl's user avatar

ShlShl

3,1701 gold badge17 silver badges16 bronze badges

Just relaunch your project from the termial

e.g. yourprojectdir code .

answered Dec 5, 2022 at 7:52

Shashank's user avatar

I also ran into this error. Restart the PC works for me.

answered Feb 17, 2017 at 13:42

Umair Akbar's user avatar

Umair AkbarUmair Akbar

5785 silver badges11 bronze badges

1

Do not launch the VS code from the start menu separately. Use

$Code .

command to launch VS code. Now, create your file with the extension .js and Start debugging (F5) it. It will be executed.

Otherwise, restart your system and follow the same process.

answered Jul 10, 2018 at 10:31

Sourav Debnath's user avatar

The cause for me receiving this error was trying the new pre-release VSCode JS debugger.

If you opted in, change via User settings:

    "debug.javascript.usePreview": true|false

Everything in my normal configuration and integrated terminal was correct and finding executables. I wasted a lot of time trying other things!

answered Apr 20, 2020 at 19:41

Sean Patrick Murphy's user avatar

3

(CMD+SHIFT+P) Shell command: Install ‘code’ command in PATH

should do the trick!

answered Jul 26, 2021 at 15:12

Tellisense's user avatar

TellisenseTellisense

1,86812 silver badges11 bronze badges

1

i resolved this problem after disable ESLint extention.

answered Apr 19, 2020 at 8:11

Kasra Karami's user avatar

I am on OSX, this did not work for me:

code . --user-data-dir='.'

but this DID work:

code . -data-dir='.'

answered Apr 19, 2020 at 10:23

Pauls Bebris's user avatar

This is the solution according to the VS code debugging page.
This worked for my setup on Windows 10.

"version": "0.2.0",
"configurations": [
{
    "type": "node",
    "request": "launch",
    "name": "Launch Program",
    "program": "${file}"
}

The solution is here:

https://code.visualstudio.com/docs/editor/debugging

Here is the launch configuration generated for Node.js debugging

answered Jun 3, 2020 at 19:39

D.L's user avatar

D.LD.L

4,3555 gold badges23 silver badges47 bronze badges

I also encountered this issue. Did the following and it got fixed.

  1. Open your computer terminal (not VSCode terminal) and type node —version to ensure you have node installed. If not, then install node using nvm.
  2. Then head to your bash file (eg .bashrc, .bash_profile, .profile) and add the PATH:
 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm 
 [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
  1. If you have multiple bash files, you ensure to add the PATH to all of them.
  2. Restart your VSCode terminal and it should be fine.

answered Jun 9, 2020 at 4:46

Obinna Nnenanya's user avatar

Mine was more project specific. We use «Auto Reload» to run our launch.json for the backend. The error states the file path of the runtimeExecutable and allows you to open launch.json. In my launch.json case:

"runtimeExecutable": "${workspaceFolder}/functions/node_modules/.bin/nodemon"

I tried the restarts and answers here originally but no luck, so I manually explored into my functions/node_modules folder and realized .bin was missing. I used my terminal to path into functions like so:

   cd functions

   Terminal directory path example: ( ~/OneDrive/Desktop/{project dir covered}/{project dir covered}/functions )

Then I did an npm install using npm i, and now everything is back to normal. Keep in mind, most of these answers are general fixes. If your situtation is more specific, be sure to break it down from the start. Hope this might help others!

answered Jun 22, 2022 at 20:14

Snake780's user avatar

Type: Bug

I am running VS Code 1.74 on a Windows 10 OS. I also have installed Node.js v18.12.1. I attempted to run a basic «Hello World» JS program in VS Code using both the cmd terminal and the powershell terminal. Expected results would have been to see «Hello, world» printed on the terminal. However, I got the following error message: » { code: ‘MODULE_NOT_FOUND’, requireStack: [] } Node.js v18.12.1.»

It appears that VS Code isn’t recognizing Node.js. I have looked on your site for solutions, however there appear to be none. Any assistance that could be provided in this matter would be appreciated.

Thank you,

Michaela Rehm

VS Code version: Code 1.74.2 (e8a3071, 2022-12-20T10:29:14.590Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: No

System Info

Item Value
CPUs Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (4 x 2712)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 7.90GB (1.24GB free)
Process Argv
Screen Reader no
VM 0%

Extensions (9)

Extension Author (truncated) Version
vscode-node-debug-process-picker apr 1.0.0
npm-intellisense chr 1.4.4
path-intellisense chr 2.8.4
vscode-eslint dba 2.2.6
vscode-pull-request-github Git 0.56.0
vscode-versionlens pfl 1.0.10
node-pack Swe 0.1.16
intellicode-api-usage-examples Vis 0.2.6
vscodeintellicode Vis 1.2.29

A/B Experiments

vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
pyindex848:30577860
nodejswelcome1cf:30587006
3biah626:30602489
iaj6b796:30613358
89544117:30613380
fim-prod:30623723

@connor4312 , i have received following log (exthost.log) as follows;

[2020-08-30 09:12:25.295] [exthost] [info] extension host started
[2020-08-30 09:12:25.305] [exthost] [info] ExtensionService#_doActivateExtension vscode.microsoft-authentication {"startup":false,"extensionId":{"value":"vscode.microsoft-authentication","_lower":"vscode.microsoft-authentication"},"activationEvent":"onAuthenticationRequest:microsoft"}
[2020-08-30 09:12:25.305] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/microsoft-authentication/dist/extension.js
[2020-08-30 09:12:25.312] [exthost] [info] ExtensionService#_doActivateExtension vscode.github-authentication {"startup":false,"extensionId":{"value":"vscode.github-authentication","_lower":"vscode.github-authentication"},"activationEvent":"onAuthenticationRequest:github"}
[2020-08-30 09:12:25.312] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js
[2020-08-30 09:12:25.316] [exthost] [info] ExtensionService#_doActivateExtension vscode.typescript-language-features {"startup":false,"extensionId":{"value":"vscode.typescript-language-features","_lower":"vscode.typescript-language-features"},"activationEvent":"onLanguage:javascript"}
[2020-08-30 09:12:25.316] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension
[2020-08-30 09:12:25.324] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch {"startup":true,"extensionId":{"value":"vscode.debug-auto-launch","_lower":"vscode.debug-auto-launch"},"activationEvent":"*"}
[2020-08-30 09:12:25.324] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/debug-auto-launch/dist/extension
[2020-08-30 09:12:25.325] [exthost] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":true,"extensionId":{"value":"vscode.emmet","_lower":"vscode.emmet"},"activationEvent":"*"}
[2020-08-30 09:12:25.325] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/emmet/dist/node/emmetNodeMain
[2020-08-30 09:12:25.331] [exthost] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"extensionId":{"value":"vscode.github","_lower":"vscode.github"},"activationEvent":"*"}
[2020-08-30 09:12:25.331] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main
[2020-08-30 09:12:25.343] [exthost] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":true,"extensionId":{"value":"vscode.merge-conflict","_lower":"vscode.merge-conflict"},"activationEvent":"*"}
[2020-08-30 09:12:25.343] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/merge-conflict/dist/mergeConflictMain
[2020-08-30 09:12:25.344] [exthost] [info] ExtensionService#_doActivateExtension vscode.search-result {"startup":true,"extensionId":{"value":"vscode.search-result","_lower":"vscode.search-result"},"activationEvent":"*"}
[2020-08-30 09:12:25.344] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/search-result/dist/extension.js
[2020-08-30 09:12:25.440] [exthost] [info] ExtensionService#_doActivateExtension vscode.github {"startup":true,"extensionId":{"value":"vscode.github","_lower":"vscode.github"},"activationEvent":"*"}
[2020-08-30 09:12:25.440] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/github/dist/extension.js
[2020-08-30 09:12:25.447] [exthost] [info] eager extensions activated
[2020-08-30 09:12:32.127] [exthost] [info] extension host started
[2020-08-30 09:12:32.137] [exthost] [info] ExtensionService#_doActivateExtension vscode.microsoft-authentication {"startup":false,"extensionId":{"value":"vscode.microsoft-authentication","_lower":"vscode.microsoft-authentication"},"activationEvent":"onAuthenticationRequest:microsoft"}
[2020-08-30 09:12:32.137] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/microsoft-authentication/dist/extension.js
[2020-08-30 09:12:32.144] [exthost] [info] ExtensionService#_doActivateExtension vscode.github-authentication {"startup":false,"extensionId":{"value":"vscode.github-authentication","_lower":"vscode.github-authentication"},"activationEvent":"onAuthenticationRequest:github"}
[2020-08-30 09:12:32.144] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js
[2020-08-30 09:12:32.148] [exthost] [info] ExtensionService#_doActivateExtension vscode.typescript-language-features {"startup":false,"extensionId":{"value":"vscode.typescript-language-features","_lower":"vscode.typescript-language-features"},"activationEvent":"onLanguage:javascript"}
[2020-08-30 09:12:32.148] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension
[2020-08-30 09:12:32.157] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch {"startup":true,"extensionId":{"value":"vscode.debug-auto-launch","_lower":"vscode.debug-auto-launch"},"activationEvent":"*"}
[2020-08-30 09:12:32.157] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/debug-auto-launch/dist/extension
[2020-08-30 09:12:32.158] [exthost] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":true,"extensionId":{"value":"vscode.emmet","_lower":"vscode.emmet"},"activationEvent":"*"}
[2020-08-30 09:12:32.158] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/emmet/dist/node/emmetNodeMain
[2020-08-30 09:12:32.164] [exthost] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"extensionId":{"value":"vscode.github","_lower":"vscode.github"},"activationEvent":"*"}
[2020-08-30 09:12:32.164] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main
[2020-08-30 09:12:32.176] [exthost] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":true,"extensionId":{"value":"vscode.merge-conflict","_lower":"vscode.merge-conflict"},"activationEvent":"*"}
[2020-08-30 09:12:32.176] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/merge-conflict/dist/mergeConflictMain
[2020-08-30 09:12:32.177] [exthost] [info] ExtensionService#_doActivateExtension vscode.search-result {"startup":true,"extensionId":{"value":"vscode.search-result","_lower":"vscode.search-result"},"activationEvent":"*"}
[2020-08-30 09:12:32.177] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/search-result/dist/extension.js
[2020-08-30 09:12:32.272] [exthost] [info] ExtensionService#_doActivateExtension vscode.github {"startup":true,"extensionId":{"value":"vscode.github","_lower":"vscode.github"},"activationEvent":"*"}
[2020-08-30 09:12:32.272] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/github/dist/extension.js
[2020-08-30 09:12:32.285] [exthost] [info] eager extensions activated
[2020-08-30 09:12:33.730] [exthost] [info] ExtensionService#_doActivateExtension vscode.configuration-editing {"startup":false,"extensionId":{"value":"vscode.configuration-editing","_lower":"vscode.configuration-editing"},"activationEvent":"onLanguage:jsonc"}
[2020-08-30 09:12:33.730] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/configuration-editing/dist/configurationEditingMain
[2020-08-30 09:12:33.732] [exthost] [info] ExtensionService#_doActivateExtension vscode.json-language-features {"startup":false,"extensionId":{"value":"vscode.json-language-features","_lower":"vscode.json-language-features"},"activationEvent":"onLanguage:jsonc"}
[2020-08-30 09:12:33.733] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/client/dist/node/jsonClientMain
[2020-08-30 09:12:42.489] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-server-ready {"startup":false,"extensionId":{"value":"vscode.debug-server-ready","_lower":"vscode.debug-server-ready"},"activationEvent":"onDebugResolve"}
[2020-08-30 09:12:42.489] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/debug-server-ready/dist/extension
[2020-08-30 09:12:42.491] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode.js-debug {"startup":false,"extensionId":{"value":"ms-vscode.js-debug","_lower":"ms-vscode.js-debug"},"activationEvent":"onDebugResolve:node"}
[2020-08-30 09:12:42.491] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/extension.js
[2020-08-30 09:12:42.585] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode.node-debug2 {"startup":false,"extensionId":{"value":"ms-vscode.node-debug","_lower":"ms-vscode.node-debug"},"activationEvent":"onDebugResolve:node"}
[2020-08-30 09:12:42.585] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.node-debug2/out/src/extension
[2020-08-30 09:12:42.593] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode.node-debug {"startup":false,"extensionId":{"value":"ms-vscode.node-debug","_lower":"ms-vscode.node-debug"},"activationEvent":"onDebugResolve:node"}
[2020-08-30 09:12:42.593] [exthost] [info] ExtensionService#loadCommonJSModule file:///Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.node-debug/dist/extension.js

I recently re-installed my Windows 10 machine and Visual Studio Code with it. All my extensions were gone too, and previously I have used the “Code Runner” extension to run JavaScript code directly in Visual Studio Code. I installed it, and when I tried to run my code I got the ‘node’ is not recognized as an internal or external command VSCode error message.

Gladly, the solution to this problem is very easy.

The solution to the problem is simply installing Node.js. Node.js is necessary for Code Runner to run its magic. Simply go to the Node.js Website and download the appropriate Node.js version.

The Windows Installer (.msi) 64-bit package should be suitable for most of you.

In the installer, simply keep everything as default and run through the routine.

Make sure the Add to PATH option is checked. Once the installation is done, restart your Visual Studio Code and try to run Code Runner again. Your problem now should be solved.

Conclusion

Visual Studio Code in combination with the Code Runner extension is a powerful tool to run your code within seconds. I really like the simplicity of Visual Studio Code.

Понравилась статья? Поделить с друзьями:
  • Vipnet client ошибка недопустимые данные 0xd vipnet
  • Visio ошибка непредвиденный конец файла
  • Virtualbox критическая ошибка при запуске
  • Visio ошибка 607
  • Virtualbox критическая ошибка не удалось получить com объект