angular-user-idle: Cannot use with AOT (angular-cli)
Angular 4 Using angular-cli
I receive errors when running a production AOT build: ng build -prod -aot.
My node_modules folder is located in a directory above /src.
Errors: `ERROR in ./src/$$_gendir/app/core/app.module.ngfactory.ts
Module not found: Error: Can’t resolve ‘angular-user-idle/user-idle.config’ in
‘/path/to/code/src/$$_gendir/app/core’ resolve ‘angular-user-idle/user-idle.config’ in ‘/path/to/code/src/$$_gendir/app/core’
Parsed request is a module using description file: /path/to/code/package.json (relative path: ./src/$$_gendir/app/core) Field ‘browser’ doesn’t contain a valid alias configuration after using description file: /path/to/code/package.json (relative path: ./src/$$_gendir/app/core) resolve as module /path/to/code/src/$$_gendir/app/core/node_modules doesn’t exist or is not a directory …`
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 21 (4 by maintainers)
Commits related to this issue
- fix(aot): include ts-sources in dist (close #2, #3) — committed to rednez/angular-user-idle by rednez 6 years ago
The node module does not have the ts files included, which causes the above error. It has only *.d.ts files To fix the error i manually downloaded the files from the git project and pasted inside the node_modules\angular-user-idle
to be honest i managed to get this working but i’m not sure how as it was a month ago and i forgot what i did… but i think it was about cleaning / reinstalling / updating all modules