I use nrwl.io in my project.
I created several libs:
ng g lib rest //ok
ng g lib services //ok
ng g lib models //created ok, but "Cannot find module " later on!
All of these libs were successfully created, but when I try to import my models
lib I see error "Cannot find module":
import { ModelA, ModelB } from '@myproj/models'; //Cannot find module '@myproj/models'
The question is: How and where I can check if my '@myproj/models'
was properly registered?
P.S. I can see "models" module in nx.json
, angular.json
and tsconfig.json
. And I can see no difference with other modules.
P.P.S. I use "@nrwl/nx": "6.1.0"
and "@nrwl/schematics": "6.1.0"
In my case it was because I was dumb and didn't restart my TypeScript server in VS Code:
CMD / CTRL + SHIFT + P
>TypeScript: Restart TS Server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With