Skip to content

Instantly share code, notes, and snippets.

@yqrashawn
yqrashawn / node-npm-install.md
Created July 19, 2018 23:21 — forked from rcugut/node-npm-install.md
Install node & npm on Mac OS X with Homebrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

--- 20-195405.el 2018-07-20 20:00:48.000000000 +0800
+++ 20-195454.el 2018-07-20 19:55:04.000000000 +0800
@@ -1,63 +1,62 @@
-(defun find-dired (dir args)
- "Run `find' and go into Dired mode on a buffer of the output.
+(defun fd-dired (dir args)
+ "Run `fd' and go into Dired mode on a buffer of the output.
The command run (after changing into DIR) is essentially
- find . \\( ARGS \\) -ls