Internal Error: EACCES: permission denied, symlink '../lib/node_modules/corepack/dist/pnpm.js' -> '/usr/local/bin/pnpm'
Asked Answered
G

4

14

I'm trying to enable 'corepack' by running

corepack enable

according to the directions here: https://yarnpkg.com/getting-started/install

but getting this error

Internal Error: EACCES: permission denied, symlink '../lib/node_modules/corepack/dist/pnpm.js' -> '/usr/local/bin/pnpm'

How to fix this?

Gorlicki answered 28/7, 2022 at 16:39 Comment(0)
G
2

For whatever reason the downloaded node gave me all sorts of permission issues. What does work is using nvm to install node.

First install nvm using these directions https://tecadmin.net/install-nvm-macos-with-homebrew/

Then follow these next steps:

nvm install --lts

corepack enable

yarn

Gorlicki answered 28/7, 2022 at 17:6 Comment(0)
M
13

I experienced it today. Adding sudo worked fine for me.

sudo corepack enable
Matthia answered 20/8, 2022 at 8:24 Comment(0)
U
10

Encountered this myself and it seems like the issue was that the circleci environment doesn't allow access to the default location corepack adds it's binary symlinks (/usr/local/bin/...). For me it was fixed by instead using ~/bin for the corepack install directory:

corepack enable --install-directory ~/bin
Unmask answered 19/8, 2022 at 3:37 Comment(0)
G
2

For whatever reason the downloaded node gave me all sorts of permission issues. What does work is using nvm to install node.

First install nvm using these directions https://tecadmin.net/install-nvm-macos-with-homebrew/

Then follow these next steps:

nvm install --lts

corepack enable

yarn

Gorlicki answered 28/7, 2022 at 17:6 Comment(0)
N
0

try this command it will run

sudo corepack enable
Notification answered 6/12, 2023 at 3:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.