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
I can use the private package with ng serve or ng build, but when I use ng serve -aot or ng build -prod,will put error like this.
ERROR in ./apps/myapp/src/main.ts
Module not found: Error: Can't resolve './app/app.module.ngfactory' in '/Users/aaronjin/aaronjin2013/NX-packagr/apps/myapp/src'resolve './app/app.module.ngfactory' in '/Users/aaronjin/aaronjin2013/NX-packagr/apps/myapp/src' using description file: /Users/aaronjin/aaronjin2013/NX-packagr/package.json (relative path: ./apps/myapp/src) Field 'browser' doesn't contain a valid alias configuration
after using description file: /Users/aaronjin/aaronjin2013/NX-packagr/package.json (relative path: ./apps/myapp/src)
using description file: /Users/aaronjin/aaronjin2013/NX-packagr/package.json (relative path: ./apps/myapp/src/app/app.module.ngfactory)
no extension
Field 'browser' doesn't contain a valid alias configuration /Users/aaronjin/aaronjin2013/NX-packagr/apps/myapp/src/app/app.module.ngfactory doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration /Users/aaronjin/aaronjin2013/NX-packagr/apps/myapp/src/app/app.module.ngfactory.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration /Users/aaronjin/aaronjin2013/NX-packagr/apps/myapp/src/app/app.module.ngfactory.js doesn't exist
as directory
/Users/aaronjin/aaronjin2013/NX-packagr/apps/myapp/src/app/app.module.ngfactory doesn't exist[/Users/aaronjin/aaronjin2013/NX-packagr/apps/myapp/src/app/app.module.ngfactory][/Users/aaronjin/aaronjin2013/NX-packagr/apps/myapp/src/app/app.module.ngfactory.ts][/Users/aaronjin/aaronjin2013/NX-packagr/apps/myapp/src/app/app.module.ngfactory.js][/Users/aaronjin/aaronjin2013/NX-packagr/apps/myapp/src/app/app.module.ngfactory] @ ./apps/myapp/src/main.ts 3:0-66 @ multi ./apps/myapp/src/main.ts
I can't understand Why does it happen,maybe because Version conflict?
This package is a feature module,develop in libs,has NgModule,RouterModule,StoreModule,and use ng-packagr package it.
Angular 5.1 and CLI 1.5 had an issue where sometimes they would mask an error. The compilation would fail and the factory file would not be generated. The CLI would not show the source of the problem--only the fact that the file isn't there.
Could you upgrade to Nx 0.7.0 (and run nx-migrate after)? I'll switch switch your project to use the newer CLI and the newer Angular.
Type of Issue
Description
I can use the private package with
ng serve
orng build
, but when I useng serve -aot
orng build -prod
,will put error like this.I can't understand Why does it happen,maybe because Version conflict?
This package is a feature module,develop in libs,has NgModule,RouterModule,StoreModule,and use ng-packagr package it.
How To Reproduce
I push the code to this repo
NX-packagr
Expected Behaviour
I would like to have successful AOT compile.
Version Information
The text was updated successfully, but these errors were encountered: