VScode Solution for Code runner not supported or defined

In this short tutorial, You will learn how to configure an language for Code runner and also solution for Code runner not supported or undefined error.

Visual studio code supports almost all programming languages as (languages)[https://code.visualstudio.com/docs/languages/overview]

In my vscode, I create an javascript file and trying to run with an option( Right click + Run code or shortcut Ctrl + Alt+ N), got an error as follows

Code runner not supported or undefined vscode

The problem is VScode is trying to run javascript file code runner does not support this files.

Visual studio code has inbuilt code runner extension which supports all major programming language java,javascript and typescript etc.

Solution to fix code language runner not supported or defined for javascript

First, Go to select language mode in viscode, Right bottom of It open language mode screen as seen below

Code runner not supported or undefined vscode

Choose either Auto Detect or select language , in this case javascript Save the changes.

if the same issue occurred for other languages or file formats,Please make sure that install the extension for languages and follow the same steps.

Other way, is to add javascript with File associations in settings.json

“files.associations”: { “*.js”: “plaintext” },

Finally, You can open terminal and run below command

node filename.js

This will run javascript successfully


On this sort article, You learned how to fix code language runner when running javascript code in visual studio code

Join 6,000 subscribers and get a daily digest of full stack tutorials delivered to your inbox directly.No spam ever. Unsubscribe any time.

Similar Posts
You'll get a notification every time a post gets published here.