20220715 Install Node Typescript Cdk
Install Node.js, Typescript, CDK on Ubuntu
The following is based on https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html#getting_started_prerequisites and https://www.linode.com/docs/guides/how-to-install-use-node-version-manager-nvm/
- Install Node.sh.
sudo apt install node
- Install nvm.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
- Run the following to enable nvm without having to log back in.
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
- Switch to Node.js version 16.
nvm install 16 && nvm use 16
- Install TypeScript
npm -g install typescript
- Install aws-cdk
npm install -g aws-cdk
- Check the CDK version
cdk --version