nvm is not compatible with the npm config "prefix" option: currently set to "/root/.npm-global" Run

midasTouchParas
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 22, 2021

Hi Team,

I have Pipeline configure for SFDX Project.

Problem 1 :

Below are the commands for Installing Node and Setting the Path :


curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh
- nvm install v10
- nvm --version
- mkdir ~/.npm-global
- npm config set prefix '~/.npm-global'
- export PATH=~/.npm-global/bin:$PATH
- NPM_CONFIG_PREFIX=~/.npm-global
#- source ~/.profile
- npm config set user 0
- npm config set unsafe-perm true
- npm install sfdx-cli --global
- node -v
- npm -v


Error -
nvm is not compatible with the npm config "prefix" option: currently set to "/root/.npm-global"
Run `nvm use --delete-prefix v8.9.4 --silent` to unset it.


Problem 2 - I have .sh file in my project which I am running via Pipeline, while running it gives an error saying
Error :
+ ./dep.sh $STARTCOMMIT
bash: ./dep.sh: Permission denied

 

1 answer

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 26, 2021

@midasTouchParas  hi. Thanks for your question. Maybe you should use node docker image instead of installing manually?

Regards, Igor.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events