2
mac high sierra에 node.js와 npm을 설치하고 싶습니다.
https://gist.github.com/rcugut/c7abd2a425bb65da3c61d8341cd4b02d
성공적으로 node.js를 설치하지만 NPM을 설치할 수 없습니다.
어떻게하면됩니까?mac high sierra에 npm 설치
Hoyeongui-MacBook-Air:~ hoyeongkim$ node -v
v8.9.1
Hoyeongui-MacBook-Air:~ hoyeongkim$ curl -L https://www.npmjs.com/install.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6255 100 6255 0 0 2628 0 0:00:02 0:00:02 --:--:-- 2629
tar=/usr/bin/tar
version:
bsdtar 2.8.3 - libarchive 2.8.3
install [email protected]
fetching: https://registry.npmjs.org/npm/-/npm-5.5.1.tgz
module.js:538
throw err;
^
Error: Cannot find module '/private/var/folders/jn/6wwl3xfd25x94ky333nhcxb80000gn/T/npm.58735/package/bin/read-package-json.js'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
added 1 package and removed 1 package in 0.846s
/usr/local/Cellar/node/8.9.1/bin/npm -> /usr/local/Cellar/node/8.9.1/lib/node_modules/npm/bin/npm-cli.js
/usr/local/Cellar/node/8.9.1/bin/npx -> /usr/local/Cellar/node/8.9.1/lib/node_modules/npm/bin/npx-cli.js
+ [email protected]
updated 1 package in 1.687s
It worked
Hoyeongui-MacBook-Air:~ hoyeongkim$ npm
-bash: npm: command not found
HTH HTTPS : //gist.github.com/DanHerbert/9520689 –
@MarkSetchell T 행크스,하지만 작동하지 않습니다. –
Homebrew를 통해 npm을 설치하려는 이유는 무엇입니까? 이것이 가장 간단한 해결책 인'brew install node'입니다. – bfontaine