Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Superchain: missing permissions for installation of global packages #4141

Closed
Obirah opened this issue Jun 9, 2023 · 3 comments
Closed

Superchain: missing permissions for installation of global packages #4141

Obirah opened this issue Jun 9, 2023 · 3 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@Obirah
Copy link

Obirah commented Jun 9, 2023

Describe the bug

When using the Superchain image (1-buster-slim-node18 in my case) in GitLab CI and trying to install global NPM packages (e.g. npm i -g pnpm), the build fails with a permission denied error indicating that the superchain user has no permissions to write to /usr/lib/node_modules.

Expected Behavior

It should be possible to install global NPM packages out-of-the-box.

Current Behavior

Installing a global NPM package fails with a permission denied error.

Reproduction Steps

Run a GitLab CI job with the Superchain image and try to install a global package.

Possible Solution

Give the sufficient permissions to the superchain user (or add pnpm to the default tools 😉).

Additional Information/Context

Current workaround is to change the installation directory for global packages before installing them:

mkdir ~/npm-global
npm config set prefix '~/npm-global'
export PATH=~/npm-global/bin:$PATH
npm i -g pnpm

SDK version used

1-buster-slim-node18

Environment details (OS name and version, etc.)

1-buster-slim-node18 on GitLab CI

@Obirah Obirah added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 9, 2023
@antoniordz96
Copy link

Thanks for the tip. Would be nice to see pnpm as a default tool in this image or ability to install global modules

@mrgrain
Copy link
Contributor

mrgrain commented Apr 9, 2024

We have sudo available in superchain:

sudo npm i -g pnpm

@mrgrain mrgrain closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2024
Copy link
Contributor

github-actions bot commented Apr 9, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants