Closed piernik closed 6 years ago
My guess is you're ending up with two instances of Angular package being installed, and at runtime you have two different ElementRef
symbols, one of which isn't known by the injector. @vsavkin has written an article on how to leverage yarn workspaces with multiple Nx workspaces: https://blog.nrwl.io/dev-workflow-using-git-submodules-and-yarn-workspaces-14fd06c07964
I use npm :/
In @utils
libs are only ts files - no tsconfig
, package
and so on. So it does not know of different @angular
files.
But I think it is an angular-cli
bug: https://github.com/angular/angular-cli/issues/10031
Can I manually change version of @angular/cli
in package file?
Is it a best practice to import modules from another workspace or should workspaces be isolated?
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
I created two workspaces
my-app
andmy-utils
.my-utils
is workspace with libs to use in multiple workspaces.What I have to do to be able to use libs from different workspace?
In
my-app
I changedpaths
propetry intsconfig.json
and added relative path tomy-utils
libs folder:When I import simpliest component (without injected services) it works, but for example this component generates error
No provider for ElementRef!
:What I'm doing worng?
Both workspaces are generated with newwest version of nx