I'm using typegoose to unify my interfaces + db schemas shared across ~6 apps. It helps me keep my data structure consistent.
Now that means that most of my types/interfaces in my Angular app are coming from an external project.
Because of this I have:
"typegoose": "^5.9.0",
"@types/mongoose": "^5.5.17",
"mongoose": "^5.6.12",
"@tlabs/models": "^1.7.13",
added as dev dependencies. All works fine and I can even build but when I try to build using universal, I can see this warning:
WARNING in ./node_modules/mongoose/lib/index.js 11:28-64
Critical dependency: the request of a dependency is an expression
x5 times about mongodb/mongoose
And when I check my lambda function log, I can see:
2019-09-17T14:56:59.691Z undefined ERROR (node:8) DeprecationWarning: This Package got moved, please use `@hasezoey/typegoose` | github:hasezoey/typegoose
which comes from typegoose so that gets me confused.
I'm 100% using only as types, if I attempt to use it by instantiating a class object using one of the types, the whole app won't work at all.
Is there something I'm missing about the configuration of webpack here?