0

When we are trying to execute yo jhipster --force --skip-git --skip-install from jenkins shell job,

we are receiving the below output:

Easy with the sudo. Yeoman is the master around here. since yo is a user command, there is no need to execute it with root permissions. if you're having permission errors when using yo without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.

Yo is being installed in the server using docker file with the command RUN sh -c 'yo@3.1.1 --unsafe-perm=true --allow-root'

previously we were not facing this issue with the use of yo.

the jenkins shell screenshot

  • Why do you use `yo jhipster` rather than simply the `jhipster` command as shown in our docs (see https://www.jhipster.tech/creating-an-app/)? Anyway yo is right, why do you need to run as root? – Gaël Marziou Apr 15 '21 at 21:34
  • Command: “yo jhipster --force --skip-git --skip-install --no-insight” ---- it’s showing error as “Easy with the `sudo`. Yeoman is the master around here” even without the root access command as above because the container itself is running as root user. Previously we didn't face any such issue. Anyway the yo will be used when we'll execute the custom module created by us, yo jhipster-appswift. Here it'll fail if not in the jhipster --force --skip-git command. – Dibyaratnam Samarlia Apr 16 '21 at 05:24
  • So it's your own docker container for JHipster? Then have you considered modifying it to switch to a non root user? – Gaël Marziou Apr 16 '21 at 08:05
  • Yes, it's our own docker container. Okay, I will try with what you have suggested. Will update here once done. – Dibyaratnam Samarlia Apr 16 '21 at 13:51
  • Changing the docker container worked for us. But now we are facing a new issue. yo jhipster-appswift --force on execution, giving below error, Error jhipster-appswift --force This generator (jhipster-appswift:app) requires yeoman-environment at least 3.0.0, current version is 2.10.3, try reinstalling latest version of 'yo' or use '--ignore-version-check' option.While checking for it, we found the yeoman-environment in package.json for generator-jhipster(6.10.3) to be 2.10.3 and in the package-lock.json file of custom jhipster module(jhipster-appswift) Not sure on how to resolve it. – Dibyaratnam Samarlia Apr 19 '21 at 14:47
  • Upgrade to JHipster 7 – Gaël Marziou Apr 19 '21 at 16:32
  • Had to remove yo with some workarounds. Now it works. – Dibyaratnam Samarlia May 19 '21 at 03:43

0 Answers0