2

I don't think this is an issue specific to lerna, I actually think it is nvm related (though I commented out nvm from my .bash_profile to test that, without success).

I'm trying to lerna bootstrap but it keeps using (and failing) an older version (1.3.2) of yarn than what I'm running:

$ yarn -v
1.22.4

$ lerna bootstrap
info cli using local version of lerna
lerna notice cli v3.22.1
lerna info versioning independent
lerna info bootstrap root only
yarn install v1.3.2
error An unexpected error occurred: "patterns.map is not a function".
info If you think this is a bug, please open a bug report with the information provided in "yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
lerna ERR! yarn install --mutex network:42424 --non-interactive exited 1 in 'root'
lerna ERR! yarn install --mutex network:42424 --non-interactive exited 1 in 'root'

$ yarn -v
1.22.4
RobC
  • 22,977
  • 20
  • 73
  • 80
Dan Pouliot
  • 375
  • 2
  • 7
  • 21

3 Answers3

1

For me, this was happening in Ubuntu 20.04, and it solved with unistalling cmdtest:

sudo apt-get purge cmdtest
Akram Rabie
  • 473
  • 5
  • 11
0

I rooted around in my filesystem and removed ~/.yarn and ~/node_modules/yarn and everything works now.

Dan Pouliot
  • 375
  • 2
  • 7
  • 21
0

Upgrade yarn. I use brew so I used brew install yarn and it worked.

George Edward Portillo
  • 1,059
  • 1
  • 9
  • 12