Angular app running but not showing in browser

111 views Asked by At

Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

I have tried with NPM @6 and node @12 and angular 9 run this app but same issue is throwing: Here is the screen shot of console output

We are using yarn to build the application

yarn install

yarn run build

yarn start
root@MacBook-Air % yarn start 
yarn run v1.22.21
warning ../../../../package.json: No license field
$ ng serve

chunk {main} main.js, main.js.map (main) 2.28 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 154 kB [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.js, polyfills-es5.js.map (polyfills-es5) 554 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {scripts} scripts.js, scripts.js.map (scripts) 219 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 1.45 MB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 421 kB [initial] [rendered]
Date: 2024-01-22T12:52:36.795Z - Hash: bf2d03433f62f6909ff6 - Time: 18274ms

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
2

There are 2 answers

1
Fares Loukil On

Reinstall Node Modules:

Delete the node_modules folder and the package-lock.json file (or yarn.lock if you're using Yarn) and then reinstall the dependencies:

rm -rf node_modules

rm package-lock.json  # or yarn.lock

npm install
0
Sumit On

This was compatibility issue between angular and node versions After migrating to Angular 12 it got resolved!

Thank you guys!