Search code examples
lernamonorepo

lerna link: Cannot find module '@lerna/create/command


I'm using lerna. I've tried versions 3.22.1, 3.21.0, and 3.20.0.

I'm getting the following error every time I run npx lerna link:

Cannot find module '@lerna/create/command'
Require stack:
- C:\Users\Usuario\project\node_modules\lerna\index.js
- C:\Users\Usuario\project\node_modules\lerna\cli.js

Any ideas?


Solution

  • I got it to work by:

    • Deleting all the yarn.lock files: find . -name yarn.lock -delete
    • Adding this flag to bootstrap: lerna boostrap --force-local