angular-fullstack / generator-angular-fullstack

Yeoman generator for an Angular app with an Express server
https://awk34.gitbook.io/generator-angular-fullstack
6.13k stars 1.24k forks source link

[5.0.0-rc.1] Hot Reload doesn't work #2721

Open smileavi opened 6 years ago

smileavi commented 6 years ago
Item Version
generator-angular-fullstack 5.0.0-rc.1
Node v9.4.0
npm 5.6.0
Operating System OS X 10 & Ubuntu 16
etc etc
Item Answer
TypeScript Yes
HTML Yes
SCSS & CSS Tried both
Router Angular
Mocha Yes
MongoDB Yes
Auth Yes
etc websocket added

Used npm run start:server & npm run start:client. App runs fine. Hot reload is not working. File changes do not trigger any reload on both server and client side.

Please suggest

albert-92 commented 6 years ago

What IDE do you use?

Awk34 commented 6 years ago

What IDE do you use?

This would be useful information. Some IDEs (IntelliJ) only save a copy of your changes in-memory to save on disk writes, but this makes the reloaders not able to see any changes. There's a setting to always write saves to disk.

umimehar commented 6 years ago

same issue here. i am using version 5.0.0-rc.3.....

but gulp serve is not working these manual commands are working fine.

on gulp serve .tmp folder always empty. event localhost :3000 dont serve the app.html

Awk34 commented 6 years ago

gulp serve is deprecated in 5.0.0.

Your app should be served at http://localhost:8080. .tmp folder is always empty because the webpack dev server keeps the files in-memory for faster rebuild.

smileavi commented 6 years ago

ATOM @albert-92

umimehar commented 6 years ago

ok then why gulp serve always open localhost:3000 lol.

Awk34 commented 6 years ago

@umimehar gulp serve should be gone from all documentation, ignore it. It will be removed.

umimehar commented 6 years ago

then please tell me how can i start the dev server?

Awk34 commented 6 years ago

@umimehar please read the README file: https://github.com/angular-fullstack/generator-angular-fullstack#usage

smileavi commented 6 years ago

npm run start:server and npm run start:client. @umimehar

Please refer to the below link [https://angular-fullstack.github.io/get-started/running/]

Awk34 commented 6 years ago

@smileavi back on topic, are there any more details you can provide? Is there anything strange in the console output? Can you confirm the files are actually changing?

umimehar commented 6 years ago

ok thanks. it works. seems like i need to give 2 commands to run front end and back end. cool. that was a major change. well image

and what about these 2 warnings?

Awk34 commented 6 years ago

@umimehar we'll have to wait for Angular themselves to address that. You can search those warnings within their issue board.

smileavi commented 6 years ago

@Awk34 screen shot 2018-07-11 at 14 43 19

umimehar commented 6 years ago

@Awk34
i just got that server files are not being watched? is it?

rafaelmmadeira commented 6 years ago

Same issue here, using 5.0.0-rc.3. I did a fresh scaffolding and hot reload is working fine for client but server files are not being watched.

When i run npm run start:server i got the following:

cropped

Awk34 commented 6 years ago

Replacing the run command with this should make it auto reload:

"start:server": "nodemon --watch server server"

(see #2744)

rafaelmmadeira commented 6 years ago

@Awk34

that made it to me!

Thanks!