Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm equivalent of pip install -e

In python I can install package in "editable" mode with

pip install -e .

Which means the code from current directory will be installed computer-wide, but still be able to edit code and access it from other project without re-installation.

Is it possible to do the same with npm?

like image 710
Dims Avatar asked Nov 28 '25 19:11

Dims


1 Answers

You might be looking for npm link. You first need to create a global simlink and then link it in the project you are currently working on.

cd ~/projects/node-redis    # go into the package directory
npm link                    # creates global link
cd ~/projects/node-bloggy   # go into some other package directory.
npm link redis              # link-install the package

There is an article about it here. Here is a linke to the npm documentation

like image 155
Zuabi Avatar answered Nov 30 '25 14:11

Zuabi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!