Npm link for local development

Carsten Behrens
1 min readJun 10, 2020

How to effectively work with a project spread on multiple npm packages.

THE PROBLEM

Let’s say you have a project named main, this project has a dependency external which is also developed by you.

Now you want to add a new feature to main which requires a change in both npm packages.

THE FIX

  1. Go to the external dependency you want to work on, in my case, it’s external.
  2. Create a symbolic link with npm link
npm link

3. Go to the package that uses the external dependency, in my case, it’s main

npm link external

external is the name that is defined in the package.json name property.

4. Enjoy that sweet developer experience

Originally published at https://carstenbehrens.com.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Carsten Behrens
Carsten Behrens

No responses yet

Write a response