Environment
- Node.js Version: 16.15.0
- Image Tag: lts-alpine
Expected Behavior
I should be able to install pnpm using Corepack as a non-privilegied user.
Current Behavior
When I try to install pnpm via Corepack (corepack enable) as non-privilegied user (-u node), I get the following error:
/app $ corepack enable
Internal Error: EACCES: permission denied, symlink '../lib/node_modules/corepack/dist/pnpm.js' -> '/usr/local/bin/pnpm'
Error: EACCES: permission denied, symlink '../lib/node_modules/corepack/dist/pnpm.js' -> '/usr/local/bin/pnpm'
/app $
Running corepack enable as root work as expected.
docker run -it -v $(pwd):/app node:lts-alpine /bin/sh

Steps to Reproduce
-
Create an empty project with the following package.json. The packageManager property is important here.
{
"name": "docker-node-pnpm",
"version": "1.0.0",
"private": true,
"packageManager": "pnpm@7.1.7"
}
-
Run the container as a non-privilegied user: docker run -it -v $(pwd):/app -u node node:lts-alpine /bin/sh
-
cd /app
-
corepack enable <-- This should fail
-
corepack prepare
-
pnpm install
Environment
Expected Behavior
I should be able to install pnpm using Corepack as a non-privilegied user.
Current Behavior
When I try to install pnpm via Corepack (
corepack enable) as non-privilegied user (-u node), I get the following error:Running
corepack enableasrootwork as expected.Steps to Reproduce
Create an empty project with the following
package.json. ThepackageManagerproperty is important here.{ "name": "docker-node-pnpm", "version": "1.0.0", "private": true, "packageManager": "pnpm@7.1.7" }Run the container as a non-privilegied user:
docker run -it -v $(pwd):/app -u node node:lts-alpine /bin/shcd /appcorepack enable<-- This should failcorepack preparepnpm install