-
Go to your
~/
home directory on the machine you want to install OS-specific module for, then run$ npm i compiled-package
-
Move your package into
~/.node_modules
folder (this is a special foldernode
knows to look in whenrequire
ing modules)
- So probably:
$ mv ~/node_modules/compiled-package ~/.node_modules/compiled-package
- Shorthand:
$ mv ~/{,.}node_modules/compiled-package
- Shorthand:
- (consider
rm -rf
ing the firstnode_modules
folder to clean up after yourself)