1

I use GitLab and I have several projects using different versions of node. I came across the nvm-windows project, and installed it on my local machine to try it out.

$ nvm install 14.18.0 $ nvm use 14.18.0 

raises an exception:

exit status 1: You do not have sufficient privilege to perform this operation. 

I installed the nvm package without admin priviledges into the HOME directory, so no system path is involved. I believe that mklink is to blame here as this is used to create some symbolic links.

This would mean, that I need to run the Gitlab client in admin rights, but I want to avoid this. What would be the most common approach to use a pipeline with different node versions?

2
  • 1
    stackoverflow.com/a/57401522/2864740 — then use the “per-project local version” Commented Oct 10, 2021 at 5:12
  • Fantastic, I could accept this as an answer! Commented Oct 10, 2021 at 5:21

1 Answer 1

2

As it has been said here, just execute the following line and make sure it is git-tracked to solve the problem.

node --version > .nvmrc 

and Add the following line to the package.json file:

"scripts": { "v": "node -v" } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.