Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I run an Angular app at the GitHub's Codespace?

The node is already installed (v. 19.4) as well the npm (v. 9.2.0).

The Angular use as the default port 4200.

I set the 4200 port in the port item of the Codespace of my repository.

Then, I type on Codespace's CMD "ng serve".

I was expecting the main page of Angular showing up on Chrome.

Nevertheless, what happens is a 502 ERROR.

like image 271
Lázaro Damasceno Avatar asked Oct 24 '25 04:10

Lázaro Damasceno


1 Answers

I've been able to get Angular running in Codespaces by changing the Node version to 16.13. NVM comes pre-installed, so all you need is:

nvm install 16.13

npm install -g @angular/cli

ng serve

like image 53
Meqwz Avatar answered Oct 25 '25 18:10

Meqwz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!