I have a library, let's call it my_library, that I need to link it to my app. So what I've done so far is:
1. In my_library directory:
#install dependencies
npm install
cd projects/my_library
npm install
projects/my_library/node_modules is created, then build:
cd ../..
ng build
dist/my_library is created, then: cd dist/my_library
then link build to the local npm: npm link
2. Link library to app
In app directory:
npm link my_library
But npm link my_library
gives the error:
mpm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/my_library - Not found
npm ERR! 404
npm ERR! 404 'my_library@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
Does anyone know why this error is shown and how I can solve it? Thank you.