JaveScript/NodeJS
nvm 버전 변경
알면 알 수록 재밌다!
2024. 5. 24. 10:50
회사 프로젝트 내 node.js 버전을 v22 -> v20으로 바꾸기로 했다.
$ node --version
v22.1.0
$ nvm install 20
Downloading and installing node v20.13.1...
Downloading https://nodejs.org/dist/v20.13.1/node-v20.13.1-darwin-x64.tar.xz...
######################################################################################################################################################################################################################################################### 100.0%
Computing checksum with shasum -a 256
Checksums matched!
$ nvm alias default 20
default -> 20 (-> v20.13.1)
$ nvm use 20
Now using node v20.13.1 (npm v10.5.2)
// 프로젝트가 있을 때
$ rm -rf node_modules
$ npm i
npm WARN deprecated @apidevtools/swagger-cli@4.0.4: This package has been abandoned. Please switch to using the actively maintained @redocly/cli
added 952 packages, and audited 953 packages in 20s
158 packages are looking for funding
run `npm fund` for details
4 vulnerabilities (1 low, 2 moderate, 1 critical)
To address all issues, run:
npm audit fix
Run `npm audit` for details.