Mranders
05/28/2020, 2:36 PM> Task :kotlinNpmInstall
error /var/jenkins_home/Build_pluginupgrades/build/js/node_modules/jss: Command failed.
Exit code: 126
Command: node -e "console.log('\u001b[35m\u001b[1mLove JSS? You can now support us on open collective:\u001b[22m\u001b[39m\n > \u001b[34m<https://opencollective.com/jss/donate>\u001b[0m')"
Arguments:
Directory: /var/jenkins_home/Build_pluginupgrades/build/js/node_modules/jss
Output:
/bin/sh: 1: node: Permission denied
> Task :kotlinNpmInstall FAILED
When using the plugin, where is node/yarn installed?Ilya Goncharov [JB]
05/28/2020, 2:44 PMPATH
, and when 3rd parti modules are installed, thay run some postinstall scripts which tries to run node
exec, so when you run it on Jenkins, node can have not appropriate permissions. I think, WA can be to install Node on your build servernatus drew
05/28/2020, 3:45 PMnatus drew
05/28/2020, 3:45 PMnatus drew
05/28/2020, 3:45 PMnatus drew
05/28/2020, 3:46 PMnatus drew
05/28/2020, 3:46 PMMranders
05/29/2020, 6:59 AMIlya Goncharov [JB]
05/29/2020, 7:39 AMnode
inside Jenkins, because command
node …
likely uses node from PATH
, but we don’t write our node to PATH
Mranders
05/29/2020, 10:59 AM"postinstall": "node -e \"console.log('\\u001b[35m\\u001b[1mLove JSS? You can now support us on open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34m<https://opencollective.com/jss/donate>\\u001b[0m')\""
For security reasons, this is run as non-root, which results in the permission error.
Just adding the configuration did initially not solve my problem, I had to delete my Jenkins workspace and build again.