question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Yarn fails to install lerna on node 8

See original GitHub issue

Due to one of your deep subdependencies, lerna fails to install on any node version <10.

Expected Behavior

Lerna installs correctly when using node 8.

Current Behavior

Lerna fails to install with error mkdirp@1.0.3: The engine "node" is incompatible with this module. Expected version ">=10". Got "8.17.0"

Possible Solution

The offending dependency is:

@lerna/create-symlink > @zkochan/cmd-shim > mkdirp-promise > mkdirp

Unfortunately, mkdirp-promise depends on version "*" of mkdirp, so there is no way to simply roll back a version of your @zkochan/cmd-shim dependency. The only way to fix this would be to remove your dependency on @zkochan/cmd-shim.

Steps to Reproduce (for bugs)

$ yarn global add lerna
yarn global v1.21.1
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error mkdirp@1.0.3: The engine "node" is incompatible with this module. Expected version ">=10". Got "8.17.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

Context

I am one of the maintainers of https://github.com/open-telemetry/opentelemetry-js/pull/736. We want to support node version 8, which means we need to test for it. In Circle CI, we test with node 8, 10, and 12 by running through the full install and build process using that respective docker container.

Your Environment

Executable Version
lerna --version failed to install
npm --version 6.13.4
yarn --version 1.21.1
node --version 8.17.0
OS Version
Docker Node Container node:8
MacOS Catalina 10.15.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:20
  • Comments:5

github_iconTop GitHub Comments

1reaction
gabriel-peraciocommented, May 13, 2020

Lerna version v3.1.4 is the last one that works on node 8.10. Attempting to install v3.2.0 with yarn results in

error conventional-changelog-angular@5.0.10: The engine "node" is incompatible with this module. Expected version ">=10". Got "8.10.0"
error Found incompatible module.

Versions after v3.2.0 result in different modules complaining, such as mkdirp@1.0.4 or fs-extra@9.0.0. Attempting to install with NPM will succeed, but fail with yarn.

I don’t know if it helps, but just in case, I’m using yarn workspaces.

0reactions
JamesHenrycommented, Jun 3, 2022

Hi Folks 👋

You may or may not know that lerna is now under the stewardship of Nrwl (announcement here https://github.com/lerna/lerna/issues/3121), a company with a long history of not just producing valuable open-source software (OSS), but also backing others (at the time of writing, Nrwl has donated over $50,000 to OSS it hasn’t created, see https://opencollective.com/nx for full details).

Quite simply, Nrwl ❤️ OSS, and is committed to making lerna the best it can be. We use it ourselves.

We hope you will continue to be a part of this community as we look to take things forward from here!

Please see https://github.com/lerna/lerna/discussions/3140 for more details on our plans for 2022.

In the case of this specific issue, due to its age it is no longer applicable because at the time of writing this comment the earliest supported node version is node 14.

If you run into any issues on the latest version of lerna, please feel free to open a new issue and follow the instructions: https://github.com/lerna/lerna/issues/new/choose

Many thanks 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

@lerna/npm-install | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Unable to run lerna's command - node.js - Stack Overflow
I faced this issue when I installed lerna using yarn. Reinstalling using npm solved the issue.
Read more >
Migrating a monorepo from Lerna to Yarn 3 with PnP and Zero ...
Run npm install -g yarn to update the global yarn version to latest v1 · Go into your project directory · Run yarn...
Read more >
Managing Monorepo using Lerna and Yarn workspaces
Manage multiple npm packages on a single repository; yarn install command installs all package's dependencies; Hoist duplicated dependencies ...
Read more >
A guide through The Wild Wild West of setting up a mono repo ...
Lerna calls yarn/npm install for each package inside the project and then creates symlinks between the packages that refer to each other. Being...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found