1

Is it possible to manually download an NPM package into a particular folder?

I want to compare the code of a NPM package via a diff with a similar version which I have in my repository. Rather than downloading to the node_modules folder it would be helpfull if I could place it next to my own code as its easier for me to diff that way.

Evanss
  • 23,390
  • 94
  • 282
  • 505

1 Answers1

0

Try the following:

mkdir test
cd test
npm init -f
npm install <package@version>

The package is available at test/node_modules/<package>

Anton Drukh
  • 873
  • 7
  • 12