Home > Mobile >  http-server cannot serve my angular application
http-server cannot serve my angular application

Time:01-10

I built the angular application and tried to run it with http-server. The terminal will then be flooded with never ending garbage text and the application will not run. Any idea what caused it?

Application is working fine with ng serve and the dist file actually works fine on actual server.

But for now, I would like to run the production build on my local environment for testing. enter image description here

CodePudding user response:

Can you confirm if this is the case after performing below actions?

  1. Navigate to the dist/project directory. (e.g. dist/super-heroes)

  2. Issue following command npx http-server

  3. Access the application on browser via http://127.0.0.1:8080/

CodePudding user response:

read more about this output here:

https://www.bleepingcomputer.com/news/security/dev-corrupts-npm-libs-colors-and-faker-breaking-thousands-of-apps/

  •  Tags:  
  • Related