I've an angular application a-app in 10.0.6, but I need to include it into an angular multi-project structure. In this multi-project structure, I have a b-app application.
- Angular multi-project structure is working fine.
- I have created a
my-liblibrary and included it intob-appapplication and it's working. I followed this procedure Using your own library in applications - I moved my
a-appapplication into the multi-project structure and it's working! To make this work, I'm using thepackage.json,tsconfig.json,tsconfig.base.json,angular.jsonfrom multiproject structure. Andtsconfig.app.jsonandtsconfig.spec.jsonextends../../tsconfig.base.json. - It means, I can run both applications
a-appandb-appfrom multi-project structure.
Folder structure is this:
my-workspace/
... (workspace-wide config files)
projects/ (generated applications and libraries)
a-app/ --(imported application manually)
... --(application-specific config: karma.conf.js, tsconfig.app.json, tsconfig.spec.json)
src/ --(source and support files for application)
b-app/ --(an explicitly generated application)
... --(application-specific config)
src/ --(source and support files for application)
my-lib/ --(a generated library)
... --(library-specific config)
src/ --source and support files for library)
But when I try to import my-lib in application a-app in the multi-project structure, it's not working!!! Just displays this error:
Cannot find module 'my-lib' or its corresponding type declarations
I've modified all config files from a-app to be similar to b-app, included the a-app in the angular.json, but still not working. Practically, I did steps 3-5 from here: Adding Angular application to an existing project
What am I missing in this configuration, to make it work?
@angular/core: ^12.1.3then give your library a version12.x.x.