Previously, I had a working installation of node and npm on OSX, but something went wrong when updating npm. Then I mixed things up with homebrew to try to bind, remove and reinstall node. Somewhere along the way, my initial installation of node, which used the installer from nodejs.com, and my use of brew in node. I finally got node reinstalled using homebrew, but when I try to run npm, I get the npm command not found. Here is the message I get when running brew install node.
$ brew install node ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/node-0.10.3 Already downloaded: /Library/Caches/Homebrew/node-0.10.32.mavericks.bottle.tar.gz ==> Pouring node-0.10.32.mavericks.bottle.tar.gz ==> Caveats Bash completion has been installed to: /usr/local/etc/bash_completion.d ==> make install npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /usr/local/lib/node_modules/npm/npm-debug.log npm ERR! not ok code 0 make: *** [install] Error 3 Warning: The post-install step did not complete successfully You can try again using `brew postinstall node` ==> Summary πΊ /usr/local/Cellar/node/0.10.32: 1678 files, 19M
I tried to run postinstall node as indicated in the error message, but then get this error message.
$ brew postinstall node ==> make install npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /usr/local/lib/node_modules/npm/npm-debug.log npm ERR! not ok code 0 make: *** [install] Error 3
Any ideas on installing my node installation?
Here is the last part of npm-debug.log
30 silly resolved readmeFilename: 'README.md', 30 silly resolved _id: ' npm@1.4.24 ', 30 silly resolved _shasum: 'c0b916c7b6363d1fbde42c2d1420aca8e05a4118', 30 silly resolved _from: '.' } ] 31 info install npm@1.4.24 into /usr/local/lib 32 info installOne npm@1.4.24 33 verbose lib/node_modules/npm unbuild 34 info preuninstall npm@1.4.24 35 info uninstall npm@1.4.24 36 verbose true,/usr/local/lib/node_modules,/usr/local/lib/node_modules unbuild npm@1.4.24 37 verbose /usr/local/bin,[object Object] binRoot 38 verbose lib/node_modules/npm unbuild 39 info preuninstall npm@1.4.24 40 info uninstall npm@1.4.24 41 verbose true,/usr/local/lib/node_modules,/usr/local/lib/node_modules unbuild npm@1.4.24 42 verbose /usr/local/bin,[object Object] binRoot 43 error error rolling back Error: EACCES, unlink '/usr/local/share/man/man5/npm-folders.5' 43 error error rolling back npm@1.4.24 { [Error: EACCES, unlink '/usr/local/share/man/man5/npm-folders.5'] 43 error error rolling back errno: 3, 43 error error rolling back code: 'EACCES', 43 error error rolling back path: '/usr/local/share/man/man5/npm-folders.5' } 44 error Error: EACCES, unlink '/usr/local/share/man/man5/npm-folders.5' 44 error { [Error: EACCES, unlink '/usr/local/share/man/man5/npm-folders.5'] 44 error errno: 3, 44 error code: 'EACCES', 44 error path: '/usr/local/share/man/man5/npm-folders.5' } 45 error Please try running this command again as root/Administrator. 46 error System Darwin 13.4.0 47 error command "node" "/usr/local/lib/node_modules/npm/cli.js" "install" "-g" "-f" 48 error cwd /usr/local/lib/node_modules/npm 49 error node -v v0.10.32 50 error npm -v 1.4.24 51 error path /usr/local/share/man/man5/npm-folders.5 52 error code EACCES 53 error errno 3 54 error stack Error: EACCES, unlink '/usr/local/share/man/man5/npm-folders.5' 55 verbose exit [ 3, true ]