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.
module not found: '@angular/router.ngfactory' when use 'tns run android --bundle --env.aot --env.uglify' #630
Same 😢 - hit it initially. Then change a file and it's gone, then it pops back up again. I removed a comment from the app.module.ngfactory.d.ts that was at the top of the file and it seemed to be run webpack fine, then it would fail. However, I don't know enough about the NS+Webpack to know what's going on.
This can also be replicated with a simple angular project with routing included. Run "ng serve --aot" (or edit your package.json) and modify a file and et voilá. Same crappy error, I have the entire afternoon trying to deal with this with no avail.
Downgrade sort of works. Ends up resulting in every other file change actually triggering livesync so doesn't work quite as well as it did prior whatever has caused the whole world to break here.
If anyone has a dependency version set which works 100% please post here.
@darkguy2008@NickIliev we are still seeing every other file change triggering livesync with 6.1.1 pinned angular version, you all seeing the same? Do we know if that for sure is angular related?
Certainly the description in this issue is Angular related but downgrading angular and {N} livesync is still broken to only trigger change (in particular a .html or .css/.scss file change) on every other file change so:
first view file save trggers just fine... 2nd one fails... 3rd one wins... 4th one fails...5th one wins, etc.
I can confirm that pinning "@ngtools/webpack": "6.1.1", unfortunately does not fix above. Still same issue - every other view/style file change triggers.
@NathanWalker the issue with the Can't resolve '@angular/router.ngfactory' error should be resolved by pinning "@angular/compiler" (note that this is not "@angular/compiler-cli" or "@ngtools/webpack" ) to version 6.1.1. Doing that the livesync is working as expected on my side and changes made in TS, CSS or HTML files are respected every time.
Angular are releasing a fix for the Can't resolve '@angular/router.ngfactory' issue so we would retest with the new @angular/compiler once the fix is published.
If you are still experiencing troubles with livesync on every other time, please post on what device/platform you are hitting this one - I guess it would be a candidate for opening a new issue as it seems to be a different case not related to this one.
@NickIliev Unfortunately yeah same thing (every other view/style file change triggers livesync only). Perhaps I can do a brief hangout with you tomorrow to show you?
@darkguy2008 referring to 2 different issues here - I may need to break the issue I mention out as it's different than description here. Refer to these comments specifically: #630 (comment) #630 (comment)
Additionally your package is a web project but we're talking specifically about {N} projects here.
@NathanWalker alright, thanks for your input. Actually that issue was fixed with @angular/compiler-cli 6.1.6 released today, so I'd say that part of the issue could be already solved.
Reacted by Nikolay Iliev and Andres Jordan Zeballos
To update the projects to use the latest version of @angular/compiler-cli delete the node_modules folder and run the upgrade scripts and then rerun npm i (or just manually upgrade the compiler-cli version)
Activity
NathanWalker commentedon Aug 10, 2018
@miroslavaivanova I am also seeing this? Seemed to show up ever since the latest .1 release?
NathanWalker commentedon Aug 10, 2018
@sis0k0 any insight on this one? You may be doing your talk at ngTalks right this very minutes so whenever/if you see this later :)
bradmartin commentedon Aug 10, 2018
Same 😢 - hit it initially. Then change a file and it's gone, then it pops back up again. I removed a comment from the
app.module.ngfactory.d.tsthat was at the top of the file and it seemed to be run webpack fine, then it would fail. However, I don't know enough about the NS+Webpack to know what's going on.darkguy2008 commentedon Aug 10, 2018
This can also be replicated with a simple angular project with routing included. Run "ng serve --aot" (or edit your package.json) and modify a file and et voilá. Same crappy error, I have the entire afternoon trying to deal with this with no avail.
vchimev commentedon Aug 10, 2018
Thank you, @darkguy2008!
Reported in angular/angular-cli#11835. Downgrade to
@angular/[email protected]as a workaround.NathanWalker commentedon Aug 11, 2018
Downgrade sort of works. Ends up resulting in every other file change actually triggering livesync so doesn't work quite as well as it did prior whatever has caused the whole world to break here.
If anyone has a dependency version set which works 100% please post here.
NathanWalker commentedon Aug 22, 2018
@darkguy2008 @NickIliev we are still seeing every other file change triggering livesync with 6.1.1 pinned angular version, you all seeing the same? Do we know if that for sure is angular related?
Certainly the description in this issue is Angular related but downgrading angular and {N} livesync is still broken to only trigger change (in particular a .html or .css/.scss file change) on every other file change so:
first view file save trggers just fine... 2nd one fails... 3rd one wins... 4th one fails...5th one wins, etc.
/cc @sis0k0
with the following deps:
and devDeps:
Possible that ngtools/webpack also needs to be pinned and if so anyone certain that pinning it will make livesync work as normal?
NathanWalker commentedon Aug 22, 2018
I can confirm that pinning
"@ngtools/webpack": "6.1.1",unfortunately does not fix above. Still same issue - every other view/style file change triggers.NickIliev commentedon Aug 23, 2018
@NathanWalker the issue with the
Can't resolve '@angular/router.ngfactory'error should be resolved by pinning "@angular/compiler" (note that this is not "@angular/compiler-cli" or "@ngtools/webpack" ) to version 6.1.1. Doing that the livesync is working as expected on my side and changes made in TS, CSS or HTML files are respected every time.Here is my
package.jsonAnd here is the test applicaiton I've used to test the livesync.
Angular are releasing a fix for the
Can't resolve '@angular/router.ngfactory'issue so we would retest with the new@angular/compileronce the fix is published.If you are still experiencing troubles with livesync on every other time, please post on what device/platform you are hitting this one - I guess it would be a candidate for opening a new issue as it seems to be a different case not related to this one.
NathanWalker commentedon Aug 23, 2018
We'll try this and report back today - thank you for that 👍
NathanWalker commentedon Aug 23, 2018
@NickIliev Unfortunately yeah same thing (every other view/style file change triggers livesync only). Perhaps I can do a brief hangout with you tomorrow to show you?
iOS Simulator iPhoneX 11.4
macOS 10.13.6
NathanWalker commentedon Aug 23, 2018
Additionally @NickIliev I cloned your issue repo here and ran the project and can see exactly the same livesync problem so it's broken there as well.
Repro:
tns run ios --emulator --bundle --env.aotitems.component.htmland change ActionBar title to something else and then save.And nothing happens. Save again and it will livesync. Save again and same thing so exactly the problem I describe above.
darkguy2008 commentedon Aug 23, 2018
Hi guys
Working with an old project, I found a combination that worked. Here's my package.json file without any issues and using --aot:
NathanWalker commentedon Aug 23, 2018
@darkguy2008 referring to 2 different issues here - I may need to break the issue I mention out as it's different than description here. Refer to these comments specifically:
#630 (comment)
#630 (comment)
Additionally your package is a web project but we're talking specifically about {N} projects here.
NathanWalker commentedon Aug 23, 2018
I went ahead and created separate issue to track what I'm referring to here to avoid confusion:
#641
darkguy2008 commentedon Aug 31, 2018
@NathanWalker alright, thanks for your input. Actually that issue was fixed with @angular/compiler-cli 6.1.6 released today, so I'd say that part of the issue could be already solved.
NickIliev commentedon Aug 31, 2018
@darkguy2008 thank you for the update!
@miroslavaivanova @NathanWalker @bradmartin I can confirm that indeed the latest version of @angular/compiler-cli (6.1.6) has resolved the issue. (tested via this app)
To update the projects to use the latest version of
@angular/compiler-clidelete thenode_modulesfolder and run the upgrade scripts and then rerunnpm i(or just manually upgrade the compiler-cli version)