ngx-infinite-scroll: AOT building fails: Module not found: Error: Can't resolve 'ngx-infinite-scroll/index'
This is the building command:
ng build --environment=demos --aot --progress --verbose
and this is the error output:
ERROR in ./src/$$_gendir/app/app.module.ngfactory.ts Module not found: Error: Can't resolve 'ngx-infinite-scroll/index' in '/home/user/Git/project/Application/frontend/src/$$_gendir/app' @ ./src/$$_gendir/app/app.module.ngfactory.ts 16:0-53 @ ./src/main.ts @ multi ./src/main.ts
The code compiles correctly with tsc
Installed version: ngx-infinite-scroll@0.5.1
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 34 (29 by maintainers)
Commits related to this issue
- Fix ngx-infinite-scroll/index: #162 — committed to robisim74/ngx-infinite-scroll by robisim74 7 years ago
- Merge pull request #187 from robisim74/Building_process Fix ngx-infinite-scroll/index: #162 — committed to orizens/ngx-infinite-scroll by orizens 7 years ago
- fix #157 #162 #171 #188, add examples — committed to orizens/ngx-infinite-scroll by orizens 7 years ago
@orizens This pr should solve the problem without look for different configurations for who are using Rollup: https://github.com/orizens/ngx-infinite-scroll/pull/187
Greetings, Roberto
This IS the reason. Major jumps in versions, like that, is bound to cause issues.
I’d advice towards updating to 4.x @cronosxfiles.
@jcroll Are you still there? Could you try this quick fix?
Go to node_modules/ngx-infinite-scroll and rename:
and:
Let me know (so you can work in the meantime).
Get it. I’ll fix the problem into my repo, and I’ll do a pr to this library.
This doesn’t work with angular 4.3.6 for the above stated reason. The error is: Module not found: Error: Can’t resolve ‘ngx-infinite-scroll/index’ in … What a pity. I’ll have to use the deprecated version which builds with Angular 4.3.6. I am using this in a library that gets imported into my app.