Skip to content

Symlink permission error when trying to use binarySource=install #368

@florianklumb

Description

@florianklumb

How are you running Renovate?

Self-hosted

If you're self-hosting Renovate, tell us what version of Renovate you run.

32.32.5 (renovate/renovate Docker image)

Please select which platform you are using if self-hosting.

GitLab self-hosted / Jenkins with Docker

If you're self-hosting Renovate, tell us what version of the platform you run.

14.8.5

Was this something which used to work for you, and then stopped?

I never saw this working

Describe the bug

I have the same problem as described in renovatebot/renovate#14409 (reply in thread)
When using binarySource=install with npm/node versions specified as engines in package.json and BUILDPACK=true set (cf. renovatebot/renovate#14409 (reply in thread)) I get the following error

DEBUG: Using node constraint "16.14.0" from package.json (repository=MY_REPO, branch=renovate/react-select-5.x)
DEBUG: Using buildpack dynamic installs (repository=MY_REPO, branch=renovate/react-select-5.x)
DEBUG: Executing command (repository=MY_REPO, branch=renovate/react-select-5.x)
       "command": "install-tool npm 8.3.1"
DEBUG: rawExec err (repository=MY_REPO, branch=renovate/react-select-5.x)
       "err": {
         "killed": false,
         "code": 1,
         "signal": null,
         "cmd": "install-tool npm 8.3.1",
         "stdout": "Installing legacy tool npm v8.3.1\n/home/ubuntu/npm/8.3.1/bin/npm -> /home/ubuntu/npm/8.3.1/lib/node_modules/npm/bin/npm-cli.js\n/home/ubuntu/npm/8.3.1/bin/npx -> /home/ubuntu/npm/8.3.1/lib/node_modules/npm/bin/npx-cli.js\n+ [email protected]\nadded 214 packages from 96 contributors in 5.004s\n",
         "stderr": "ln: failed to create symbolic link '/usr/local/bin/npm': Permission denied\n",
         "message": "Command failed: install-tool npm 8.3.1\nln: failed to create symbolic link '/usr/local/bin/npm': Permission denied\n",
         "stack": "Error: Command failed: install-tool npm 8.3.1\nln: failed to create symbolic link '/usr/local/bin/npm': Permission denied\n\n    at ChildProcess.exithandler (child_process.js:383:12)\n    at ChildProcess.emit (events.js:400:28)\n    at ChildProcess.emit (domain.js:475:12)\n    at maybeClose (internal/child_process.js:1058:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)"
       }

I assumed this was mitigated/solved by #346 but it doesn't seem so. Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions