Make a folder for your npm packages and tell your computer about it.Įcho NPM_PACKAGES="$/.bash_profile.Tell npm where to find/store them npm config set prefix ~/.npm-packages Make a new folder for the npm global packages mkdir ~/.npm-packages Update to the latest version of npm npm install npm -g Then we use the npm config command to tell npm where we want them.įinally, we tell our computer where the paths are to the folder. Next we create a folder for the global npm packages. I mean, its official, right? And if we don't trust the Node folks with installing Node, then, well, what are we doing here anyway? Also, do you really want to be using `sudo` to install npm packages?Īfter discussing this with Tierney Cyren, we found a much easier way to get node and npm running on my mac than what I used to do a few years back.įirst, we want to use the official Node.js install. While this helps get around the issue in the short-term, it also places stricter permissions on those installs and it becomes a slippery slope where soon you may need sudo for more than you bargained for. When running npm and node, you may find yourself getting permission errors that ultimately lead you to using `sudo` in your commands.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |