Custom Node.js Version is not being used


I have followed this to set up a custom node.js version. This is my docker file

FROM gitpod/workspace-full

# Install Node and Yarn
RUN bash -c ". .nvm/ && \
        nvm install ${NODE_VERSION} && \
        nvm alias default ${NODE_VERSION}"

ENV PATH=/home/gitpod/.nvm/versions/node/v${NODE_VERSION}/bin:$PATH

But my custom node version is not being used by terminals opened in tasks and also when I manually open a new terminal. I see default v14.16.1 when I run node -v

I have engines property set in my package.json to my custom node version so all my recommit hooks depend on it to run so vscode git is showing below error when I am trying to commit

Screenshot 2021-04-30 at 3.08.21 PM

Is there a way to override the default node.js version totally so I can avoid the above-mentioned issues or any workarounds to fix them?


Could you follow for this?

1 Like

Thanks @akosyakov

This fixed the issue.