Open huan opened 6 years ago
I found this issue caused by using 'barrel' index.ts files
, just as the error message said.
However, it's very strange that it's just a very simple barrel index.ts, there are no circle dependencies at all.
https://github.com/Chatie/db/blob/de17acc7c2d98d77b285776b0a5467362bfe4ef2/src/db.module.ts#L9-L15
If I change the above code to
- import { BotieStore } from './botie/'
+ import { BotieStore } from './botie/botie-store'
- import { GiftieStore } from './giftie'
+ import { GiftieStore } from './giftie/giftie-store'
- import { HostieStore } from './hostie'
+ import { HostieStore } from './hostie/hostie-store'
Then it will work with AOT in @chatie/app
.
Wired.
When this module is imported by @chatie/app,
npm run ionic:build --aot
saidEncountered undefined provider!
.After diving into the code, the issue https://github.com/Chatie/app/issues/33 is caused by this module
@chatie/db
.Even an empty empty import could be able to cause the error message:
Wired.
See Also