NPM link and unlink

For linking a local npm project:


In the child project:

child-project> npm link

In parent project:

parent-project> npm link child-project

For unlinking:

To delete global reference of linked child project

npm rm –global child-project

To check if package is globally installed

npm ls –global child-project

To unlink from the parent project

parent-project> npm unlink child-project

parent-project> npm install

 

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s