Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how can I run NPM commends in VSCode terminal

i just installed npm in VSCode from extantions and I don’t know how to activate it.
i want to run the command npm init in terminal but I get this error :
The term ‘npm’ is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • npm init

I tried restarting VS code but it’s still not working.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Open visual Studio Code (VSCode).

Open your venture folder in VSCode by means of selecting "file" -> "Open Folder" and deciding on the folder wherein your assignment is placed.

Once your mission is open, click on the "View" menu on the top of the VSCode window and pick out "Terminal" from the dropdown menu. This can open the incorporated terminal inside VSCode.

By means of default, the incorporated terminal opens as a command prompt. To switch to a terminal that helps npm commands, click on on the dropdown arrow subsequent to the terminal’s name (usually labeled "cmd" or "Powershell") and pick out "choose Default Shell." pick out "Git Bash" or any shell that you decide upon.

Now, you can run npm commands in the VSCode terminal. Sincerely type your preferred npm command, which includes "npm installation" to put in dependencies, and press input to execute the command.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading