Testing NPM packages locallly may not work always. Here are the steps that can be fixed
- Go to library directory and execute the following command to link the library to global NPM modules
$ npm link
$ npm link
- Now go to project directory and use the linked package (twice)
$ npm link <package_name>
$ npm link <package_name>
- If the above step does not work, delete
node_modules
and install dependencies and run again
$ rm -rf node_modules/
$ npm install
$ npm link <package_name>
$ npm link <package_name>