node.jsmacosnpmyarnpkgcorepack

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


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?


Solution

  • 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