I am trying to import a locally developed Angular project/module into an angular application without publishing it into npm repository.
First, I followed this tutorial to build my module in UMD format (I skipped the publish part):
https://medium.com/@cyrilletuzi/how-to-build-and-publish-an-angular-module-7ad19c0b4464
Then, I tried to install my module in the final application by executing this command line:
npm install ../path-to-my-module --save
This added successfully my module as @myscope/myModule
in the package.json
of my application, but the problem is that the import of the module in the application isn't recognized. I ended up by getting the following error:
Cannot find module @myscope/myModule
In my node_modules
, the folder @myscope
is created, and inside it, there is a shortcut to ../path-to-my-module
with the name myModule
Could the fact that there is a shortcut be the source of the problem? and if so how to fix it?