Bryan Downing
Bryan Downing

Reputation: 15472

Does npm touch anything besides the node_modules folder when installing a package locally?

I'm only curious about installing packages locally in a project - not globally.

Is there any difference between npm uninstall some-package and just deleting the some-package folder from the node_modules directory?

Upvotes: 2

Views: 381

Answers (1)

Aurélien Thieriot
Aurélien Thieriot

Reputation: 5923

After reading that: https://npmjs.org/doc/files/npm-folders.html I would say no. There is no difference, when using local modules between npm uninstall and deleting the directory.

However, I think the /tmp directory is used when there is additional process during the installation (Compilation, etc...). Therefore, it is possible that the uninstall command remove those files if needed (But I can't see that in the present documentation)

My two cents

Upvotes: 2

Related Questions