[NodeJS] – How to install your npm project to test it locally as a module?

Use the command: `$ npm link .`

After running this command the npm will create a symlink in the global folder{prefix}/lib/node_modules/<package> In this way, you can use your npm module and call it.

For more information: https://docs.npmjs.com/cli/link

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s