I am new to create a pipeline in aws. I want to create a ci-cd pipeline for my nuxt project. I create a yml file in which I want to install nvm and then install node version 12.18.3
The problem is I am getting the nvm not found error.
Can you please check and let me know if there is any error in my yml file:
version: 0.2
phases:
install:
commands:
- echo Installing nvm...
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
- export NVM_DIR="$HOME/.nvm"
- '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"'
- '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"'
pre_build:
commands:
#install dependencies
- echo Installing node...
- nvm install 12.18.3
- echo Installing npm...
- npm install
build:
commands:
#build
- echo building...
- npm run generate
artifacts:
files:
- '**/*'
base-directory: dist
cache:
paths:
- node_modules/**/*
Thank you.