node.js - Installing node with homebrew on OSX. Npm not found -
node.js - Installing node with homebrew on OSX. Npm not found -
i had working install of node , npm on osx, when updating npm went wrong. messed things more using homebrew seek , link, uninstall, , reinstall node. somewhere along way original node install, used installer nodejs.com, , brew usage on node conflicted. got node reinstall homebrew, when seek running npm npm command not found. here message when running brew install node.
$ brew install node ==> downloading https://downloads.sf.net/project/machomebrew/bottles/node-0.10.3 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 ==> create install npm err! npm err! additional logging details can found in: npm err! /usr/local/lib/node_modules/npm/npm-debug.log npm err! not ok code 0 make: *** [install] error 3 warning: post-install step did not finish can seek 1 time again using `brew postinstall node` ==> summary 🍺 /usr/local/cellar/node/0.10.32: 1678 files, 19m
i tried running postinstall node stated in error message error message.
$ brew postinstall node ==> create install npm err! npm err! additional logging details can 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 of how prepare node install?
here's lastly 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 /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 error: eacces, unlink '/usr/local/share/man/man5/npm-folders.5' 43 error error rolling npm@1.4.24 { [error: eacces, unlink '/usr/local/share/man/man5/npm-folders.5'] 43 error error rolling errno: 3, 43 error error rolling code: 'eacces', 43 error error rolling 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 seek running command 1 time again root/administrator. 46 error scheme 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 ]
do favor , utilize nvm
. helps manage node versions , won't need root priviledges utilize it.
nvm
here we're using curl
install script nvm
, interpreting script using bash
.
curl https://raw.githubusercontent.com/creationix/nvm/v0.17.2/install.sh | bash
install node
+ npm
this command figure out latest stable release of node
, install in system.
nvm install stable
(currently bugged, utilize nvm install 0.10
now...)
so nvm
configures terminal whenever open new window, run command too:
nvm alias default stable
(currently bugged, utilize nvm alias default 0.10
now...)
now can utilize node usual!
node foo
read nvm
documentation! here: https://github.com/creationix/nvm
node.js npm homebrew
Comments
Post a Comment