- #Mac os list installed packages how to#
- #Mac os list installed packages mac os x#
- #Mac os list installed packages install#
- #Mac os list installed packages update#
#Mac os list installed packages install#
You should be good to install npm global packages with no issues.
![mac os list installed packages mac os list installed packages](https://cdn.journaldev.com/wp-content/uploads/2020/01/r-mac-installed-successfully-1024x621.png)
Now days (October 2019) is much easier to use nvm. I believe is right, this post very important but solution is quite outdated. Since one of the core ideas behind Homebrew is that apps can be installed without giving them root access, this is a bad idea. The root of the the issue is really that npm is its own package manager and it is therefore better to have npm manage itself and its packages completely on its own instead of letting Homebrew do it.Īlso, using the Homebrew installation of npm will require you to use sudo when installing global packages. However, this is error-prone and still seems to cause problems for some people. The bug has been "fixed" by Homebrew installing npm in a way that allows it to manage itself once the install is complete. There's an NPM bug for this exact problem. Npm ERR! /Users/dan/Google Drive/Projects/dotfiles/npm-debug.log Npm ERR! Additional logging details can be found in: Npm ERR! cwd /Users/dan/Google Drive/Projects/dotfiles Npm ERR! command "/usr/local/Cellar/node/0.10.26/bin/node" "/usr/local/bin/npm" "update" "npm" "-g" Npm ERR! Refusing to delete: /usr/local/bin/npm not in /usr/local/lib/node_modules/npm Npm ERR! error rolling back at Object.oncomplete (fs.js:107:15) Npm ERR! error rolling back at /usr/local/Cellar/node/0.10.26/lib/node_modules/npm/lib/utils/gently-rm.js:52:12 Npm ERR! error rolling back at next (/usr/local/Cellar/node/0.10.26/lib/node_modules/npm/lib/utils/gently-rm.js:43:14) Npm ERR! error rolling back at clobberFail (/usr/local/Cellar/node/0.10.26/lib/node_modules/npm/lib/utils/gently-rm.js:57:12) Npm ERR! error rolling back Error: Refusing to delete: /usr/local/bin/npm not in /usr/local/lib/node_modules/npm
#Mac os list installed packages update#
If you install node with Homebrew and then try to do npm update npm -g, you may see an error like this: $ npm update npm -g If you're a Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. Now you can re-install any global npm packages you need without any problems. Run the following commands to remove all existing global npm modules, uninstall node & npm, re-install node with the correct defaults, configure the location for global npm modules to be installed, and then install npm as its own pacakge.Įxport PATH= " $HOME/.npm-packages/bin: $PATH " After you're finished you'll need to re-install them. These instructions will have you remove all of those packages. Once you're finished, you also won't need to use sudo to install npm modules globally.īefore you start, make a note of any globally installed npm packages. This solution fixes the error caused by trying to run npm update npm -g. An explanation is also included at the end of this document.
![mac os list installed packages mac os list installed packages](https://www.pc-freak.net/images/how-to-list-and-remove-packages-on-Mac-OS-X-MacBook-Air-Pro-notebooks-with-commands-Terminal.png)
To fix it quickly, use the solution below.
![mac os list installed packages mac os list installed packages](https://i.ytimg.com/vi/p3YhgPnXvNg/maxresdefault.jpg)
Installing node through Homebrew can cause problems with npm for globally installed packages.
#Mac os list installed packages mac os x#
Fixing npm On Mac OS X for Homebrew Users
#Mac os list installed packages how to#
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work. I've kept it here for historical purposes, but it should no longer be used.
![mac os list installed packages mac os list installed packages](https://miro.medium.com/max/1400/1*pQ3-xWizcOEOjpETzRonnw.png)
It was only ever intended to fix a specific error message which has since been fixed. This entire guide is based on an old version of Homebrew/Node and no longer applies.