Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Can't run VSCode; npm and ng commands not found

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
plassedon
Posts: 4
Joined: 2022-10-06 13:53
Has thanked: 2 times

[SOLVED] Can't run VSCode; npm and ng commands not found

#1 Post by plassedon »

Hi,
I tried to install VSCode both with .deb and manually by adding repos as noted in the official documentation:
https://code.visualstudio.com/docs/setu ... tributions

I also tried another tutorials, but the result is always the same- the application simply doesn't open/run.

After that I installed flatpack and on top of it VSCode flatpack(although I don't wanna use flatpacks in the long run). Although I installed npm via the synaptic and after that runned npm install -g @angular/cli when I type something in the VSCode terminal(no matter if it's sh or bash) it simply returns ng/npm: command not found.

What can I do to at least debug what's going on?

I am running Debian Testing/Bookworm 12
Last edited by plassedon on 2022-10-28 12:07, edited 1 time in total.

haowenl
Posts: 12
Joined: 2021-02-05 18:06
Been thanked: 1 time

Re: Can't run VSCode; npm and ng commands not found

#2 Post by haowenl »

Flatpak runs apps in sandboxes that cannot see the system binaries you installed. For how to make it work, refer to: https://github.com/flathub/com.visualstudio.code.

User avatar
craigevil
Posts: 5391
Joined: 2006-09-17 03:17
Location: heaven
Has thanked: 28 times
Been thanked: 39 times

Re: Can't run VSCode; npm and ng commands not found

#3 Post by craigevil »

The .deb package should just work. Use apt to install it:
sudo apt install pathtodebpackage

https://code.visualstudio.com/docs/setup/linux
https://code.visualstudio.com/sha/downl ... ux-deb-x64

plassedon
Posts: 4
Joined: 2022-10-06 13:53
Has thanked: 2 times

Re: Can't run VSCode; npm and ng commands not found

#4 Post by plassedon »

Thanks very much for the responses :)
Now I know for sure that Flatpak was the reason npm didn't get detected...
In the end I removed the flatpak and managed to run VSCode Insiders(the normal VSCode simply doesn't start), but decided to remove that as well because there is VSCodium, which is FOSS and works perfectly :)

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: Can't run VSCode; npm and ng commands not found

#5 Post by sunrat »

@plassedon please mark the topic solved by editing your first post and adding [SOLVED] so it may help others.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply