I have an Angular workspace common-web-modules, with two libraries common-components and common-services. I’m trying to use these two libraries in my angular application, my-app.
When I import the package from my registry into my-app, the compiler doesn’t complain about not being able to find the imported services / components. But when I try and serve my-app, I get the following error.
Error: Module not found: Error: Can't resolve 'common-web-modules/dist/common-services' in '...srcappmodulesmy-module'
When I create a local production build, copy the contents of the dist and paste it into the appropriate node_modules location in my-app, it works fine.
The only difference I see between the published build that is imported and the local build that is copy / pasted is the .npmignore
and package.json
files for each library aren’t showing up in the published build. Is the lack of a package.json
in the individual libraries the issue? If so, how do I include it in the pipeline build? My .yml
file is running the exact same script I’m running locally.