petrolette application for Yunohost but I’m stuck with a weird error when triggering the ci for the upgrade script.
26707 WARNING npm ERR! code 1
26707 WARNING npm ERR! command failed
26708 WARNING npm ERR! command git ls-remote https://framagit.org/yphil/favrat.git
26708 WARNING npm ERR! This account is currently not available.
I have no error when i try the command on my own server and don’t really understand what the error means.
one of my ci log
YunoRunner for CI
and the petrolette repo GitHub - YunoHost-Apps/petrolette_ynh at dev
April 9, 2021, 11:52am
It may be related to the fact that you’re running the command as
The “This account is currently not available” is symptomatic of an account that’s not configured to be used to run stuff interactively … but I don’t know if that’s really the issue (and if so it sounds like a general bug in ynh_exec_as)
Also what I find curious is that the npm install in the install script is ran as root (no ynh_exec_as) but the npm update is ran in the upgrade script is ran with ynh_exec_as $app ?
I tried first with normal npm but I get the following error :
28127 WARNING npm ERR! code 128
28129 WARNING npm ERR! command failed
28129 WARNING npm ERR! command git clone https://framagit.org/yphil/favrat.git /root/.npm/_cacache/tmp/git-clone-eb0a529e --recurse-submodules
28131 WARNING npm ERR! fatal: could not create leading directories of '/root
/.npm/_cacache/tmp/git-clone-eb0a529e': Permission denied
then I tried to use ynh_exec_as
April 9, 2021, 5:59pm
In upgrade script, instead of :
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm update
The ci still complain about right but now i get the following errors :
17692 WARNING /opt/yunohost/petrolette/node_modules/bower/lib/node_modules/configstore/index.js:54
17692 WARNING throw err;
17694 WARNING ^
17698 WARNING Error: EACCES: permission denied, open '/root/.config/configstore /bower-github.json'
17699 WARNING You don't have access to this file.
17700 WARNING at Object.openSync (node:fs:505:3)
17701 WARNING at Object.readFileSync (node:fs:401:35)
April 13, 2021, 12:06am
you should execute all yarn or npm command as $app and also $app user need to have home path = $final_path
Ok thanks, I effectively found this workaround yesterday for the home folder.
April 18, 2021, 12:42pm
Il semblerait que tu ais réussi !
Bravo, je teste cette semaine.
Bonne journée !