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.

Hoisting seems broken with npm5

See original GitHub issue

Expected Behavior

lerna bootstrap --hoist should hoist dependencies when using npm@5

Current Behavior

The correct package.json is generated in the root directory but none of the hoisted deps are installed when a package-lock.json is present…which as far as I can tell (thanks npm docs!) can’t be toggled off.

lerna.json

{
  "lerna": "2.0.0-rc.5",
  "version": "4.0.0-rc.6",
  "hoist": true,
  "packages": [
    "packages/*"
  ]
}

Your Environment

Executable Version
lerna --version 2.0.0-rc.5
npm --version 5.0.0
OS Version
macOS ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:15
  • Comments:38 (13 by maintainers)

github_iconTop GitHub Comments

7reactions
jquensecommented, May 30, 2017

might be worth making a note of somewhere, node8 is coming out today and ships with (or soon will ship with npm5) Don’t want ya’ll overrun by folks with the same issue 😃

5reactions
beemancommented, Aug 22, 2017

I’m not sure if it’s related to hoisting or not, but I found that lerna works way better when the package locks are disabled.

To disable them in all packages managed by lerna you can run:

lerna exec "echo package-lock=false >> .npmrc"

Read more comments on GitHub >

github_iconTop Results From Across the Web

Npm 5 changes to npm link. - Chevtek.io
The issue persisted through npm 4 but now we are on npm 5. ... A worked fine; a symlink was created and A's...
Read more >
Do I commit the package-lock.json file created by npm 5?
Yes, package-lock.json is intended to be checked into source control. If you're using npm 5+, you may see this notice on the command...
Read more >
pnpm/pnpm - Gitter
Install packages and build the project (Teamcity) occur in the temporary folder. And if successful, the project folder is transferred to a working...
Read more >
South Carolina Title V Comprehensive 5-Year Needs ...
NPM 5 : A) Percent of ... Table 25 Stress means a situation in which a person feels tense, restless, nervous, or anxious,...
Read more >
eslint-config-astro - npm Package Health Analysis | Snyk
Looks like eslint-config-astro is missing a security policy. ... If using npm < 5, Windows users can either install all the peer dependencies...
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