Install Nodejs in the aws linux

[git, yarn, nvm, node설치]

$ sudo yum update

git설치

$ sudo yum install git

yarn설치

$ curl -o- -L https://yarnpkg.com/install.sh | bash

$ source ~/.bashrc

nvm설치

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash

$ . ~/.nvm/nvm.sh

node설치

$ nvm install 16


[node 설치 에러 시 조치]

$ nvm install node (최신 버전 18.0.0 이 자동 설치되어 에러발생)

v18.0.0 is already installed.
node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node)
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v18.0.0` to unset it.

$ nvm ls (설치버전 확인)

$ nvm uninstall 18.0.0 (최신버전 삭제)

$ nvm install 16 (stable 버전 설치)


[react 설치]

$ npx -y create-react-app <프로젝트명>



댓글