๐Ÿค– Computer Science

MacOS node ๋ฒ„์ „ ์—…๋ฐ์ดํŠธ ์˜ค๋ฅ˜ | n: command not found ํ•ด๊ฒฐ๋ฐฉ๋ฒ•

yesolz 2023. 10. 27. 16:43
728x90

node version์„ ์—…๋ฐ์ดํŠธ ํ•˜๋ ค๋Š”๋ฐ

npm install -g n์„ ํ•ด์คฌ์Œ์—๋„

n: command not found ์˜ค๋ฅ˜๊ฐ€ ๋–ด๋‹ค.

 

curl -L https://bit.ly/n-install | bash

๋กœ๋„ ์‹œ๋„ํ•ด๋ณด์•˜์œผ๋‚˜ ์—ฌ์ „ํžˆ n: command not found ์˜ค๋ฅ˜๊ฐ€ ๋–ด๋‹ค.

 

 

๋งฅ๋ถ ์œ ์ €๋ผ๋ฉด ์นœ์ˆ™ํ•  brew ๋ฅผ ์ด์šฉํ•˜์—ฌ n์„ installํ•ด์ฃผ๋ฉด

n: command not found ๋ฅผ ํ•ด๊ฒฐํ•ด์ค„ ์ˆ˜ ์žˆ๋‹ค.

 

brew install n

๋กœ n์„ ์„ค์น˜ํ•ด์ฃผ๊ณ 

 

sudo n lts

์ด๋ ‡๊ฒŒ ์ตœ์‹  ๋ฒ„์ „์„ ๋‹ค์šด๋กœ๋“œ ํ•ด์ฃผ๋ฉด ๋œ๋‹ค.

 

 

์™„์„ฑ !

 

 

 

ref

https://www.npmjs.com/package/n#n--interactively-manage-your-nodejs-versions

 

728x90