You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
Hot Module Replacement (HMR) not working correctly, not reflecting changes in component class file #1060
Android (HMR) not working correctly
in debug/run mode any change in component class code not updating app refresh with file update change detection but not update code. But with --no-hmr its works perfectly fine.
Expected behavior
tns debug android should work as tns debug android --no-hmr
Having similar issues with IOS, I see hot module file in yellow in console, but entire app restarts but no changes are applied, used --no-hmr flag to get updates right even without hmr. strange
It'll be really appreciated if you send us the exact steps so we can reproduce the issue on our side. Also we'll need the content of your package.json file as well.
We've investigated the problem and were able to reproduce the issue using the following steps:
tns create newNgAapp - select Angular, Sidedrawer
tns run ios
Make a change inside search.component.html (or search.component.ts)
The following text is printed on the console:
CONSOLE INFO file:///app/vendor.js:80079:36: HMR: Checking for updates to the bundle with hmr hash a99b4167b83a7f4aab8b.
CONSOLE INFO file:///app/vendor.js:80079:36: HMR: No Modules Updated.
Navigate to the search page on device
Expected: The changes should be applied on device
Actual: No changes are applied on device
If you make a next change inside search component, the change will be applied on device.
Can you confirm that you hit the same issue on your side? If this is not the case, can you describe the exact steps you're executing, so we can reproduce the issue on our side? It'll be appreciated if you send us a demo project demonstrating the behavior.
We described here how we were able to reproduce the error. It seems as a minor issue as it happens only on first navigation to a lazy loaded route. Most probably it is not the same problem you faced. So, we need more information in order to help you. Without giving us the exact steps or demo project demonstrating the problem, we cannot investigate it further.
As @Fatme has already mentioned, we are not able to reproduce the issue and we are not able to investigate it further. Could you please provide us the exact dependencies' versions and some steps for reproducing the issue?
I am having the same problem for my nativescript app using v 6.1.0. on a mac. I have a project that used to work fine but all of a sudden the HMR stopped working for a specific project. The hot reload on this project still works for other projects on my mac and my co workers (all non mac users) are still able to have this project working on their computers. I know thats really vague but if i send you the dependencies would you be able to look into it.
This is a specific issue for updating lazy modules in Angular apps. I suggest you log another issue following the issue template. Also, the logs from tns run <platform> --log trace will be helpful.
P.S. Before logging the issue, please update the NativeScript CLI and the nativescript-dev-webpack plugin (along with your webpack.config.js file) to the latest versions. You could even check their rc version as we are currently preparing the 6.3.0 release and the issue could be already fixed. (npm i nativescript@rc -g, npm i nativescript-dev-webpack@rc, ./node_modules/.bin/update-ns-webpack --configs).
I'm closing this issue as it's not related to the hot updates in Angular lazy routes anymore. For further HMR related issues, please log a new one following the issue template.
For anyone still experiencing this issue, updating nativescript-dev-webpack to v1.3.0 (as @DimitarTachev and @timdoege shared) does indeed fix this issue.
(Edit: scratch that. HMR seemed to work there for a split second after the upgrade, but not anymore.)
@fgutteridge, as the recent comments are not related to the initial issue, please follow the issue template and open a new issue with steps to reproduce.
Activity
davorpeic commentedon Sep 30, 2019
Having similar issues with IOS, I see hot module file in yellow in console, but entire app restarts but no changes are applied, used
--no-hmrflag to get updates right even without hmr. strangeFatme commentedon Oct 1, 2019
@acharyaks90, @davorpeic,
It'll be really appreciated if you send us the exact steps so we can reproduce the issue on our side. Also we'll need the content of your
package.jsonfile as well.davorpeic commentedon Oct 1, 2019
I recently updated from NS 5.4.2
kdagnan commentedon Oct 1, 2019
Can also confirm I am experiencing similar issues. It will say "refreshed application on XXXX" but nothing happens on screen.
Fatme commentedon Oct 3, 2019
Hey guys,
We've investigated the problem and were able to reproduce the issue using the following steps:
tns create newNgAapp- select Angular, Sidedrawertns run iossearch.component.html(orsearch.component.ts)The following text is printed on the console:
searchpage on deviceExpected: The changes should be applied on device
Actual: No changes are applied on device
searchcomponent, the change will be applied on device.Can you confirm that you hit the same issue on your side? If this is not the case, can you describe the exact steps you're executing, so we can reproduce the issue on our side? It'll be appreciated if you send us a demo project demonstrating the behavior.
edrick27 commentedon Oct 7, 2019
hot reload don't work on TNS 6
nkishor-nsf commentedon Oct 7, 2019
I am trying...
tns debug android should work as tns debug android --no-hmr
nkishor-nsf commentedon Oct 7, 2019
I am facing same issue on TNS 6
Fatme commentedon Oct 9, 2019
Hey guys,
We described here how we were able to reproduce the error. It seems as a minor issue as it happens only on first navigation to a lazy loaded route. Most probably it is not the same problem you faced. So, we need more information in order to help you. Without giving us the exact steps or demo project demonstrating the problem, we cannot investigate it further.
Ianc22 commentedon Dec 5, 2019
bump!
DimitarTachev commentedon Dec 6, 2019
@ian22,
As @Fatme has already mentioned, we are not able to reproduce the issue and we are not able to investigate it further. Could you please provide us the exact dependencies' versions and some steps for reproducing the issue?
mhmeluskey commentedon Dec 13, 2019
Hi @DimitarTachev
I am having the same problem for my nativescript app using v 6.1.0. on a mac. I have a project that used to work fine but all of a sudden the HMR stopped working for a specific project. The hot reload on this project still works for other projects on my mac and my co workers (all non mac users) are still able to have this project working on their computers. I know thats really vague but if i send you the dependencies would you be able to look into it.
DimitarTachev commentedon Dec 13, 2019
@mhmeluskey,
This is a specific issue for updating lazy modules in Angular apps. I suggest you log another issue following the issue template. Also, the logs from
tns run <platform> --log tracewill be helpful.P.S. Before logging the issue, please update the NativeScript CLI and the
nativescript-dev-webpackplugin (along with your webpack.config.js file) to the latest versions. You could even check theirrcversion as we are currently preparing the 6.3.0 release and the issue could be already fixed. (npm i nativescript@rc -g,npm i nativescript-dev-webpack@rc,./node_modules/.bin/update-ns-webpack --configs).mhmeluskey commentedon Dec 13, 2019
@DimitarTachev running npm i nativescript@rc -g, npm i nativescript-dev-webpack@rc, seems to have fixed my problem. Thank you for your help.
timdoege commentedon Dec 13, 2019
HMR also stopped working suddenly on my Mac (I'm on NS 6.1 + Angular 8.2). Upgrading
nativescript-dev-webpackseems to fix this.DimitarTachev commentedon Dec 16, 2019
I'm closing this issue as it's not related to the hot updates in Angular lazy routes anymore. For further HMR related issues, please log a new one following the issue template.
fgutteridge commentedon Dec 20, 2019
For anyone still experiencing this issue, updatingnativescript-dev-webpackto v1.3.0 (as @DimitarTachev and @timdoege shared) does indeed fix this issue.(Edit: scratch that. HMR seemed to work there for a split second after the upgrade, but not anymore.)
I think this issue is worth reopening.
DimitarTachev commentedon Dec 21, 2019
@fgutteridge, as the recent comments are not related to the initial issue, please follow the issue template and open a new issue with steps to reproduce.