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.

How to exclude several dependencies from hoisting?

See original GitHub issue

Could I do something like --nohoist=node-pty|electron-rebuild?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
evocateurcommented, Aug 24, 2017

--nohoist is effectively an implicit negation. You can pass as many --nohoist=<glob> arguments as you want, they’ll be iterated in order to filter the list. The glob itself should match the package name, not directory or any other value.

lerna bootstrap --nohoist node-pty --nohoist electron-rebuild

Alternatively, you can provide an array under command.bootstrap.nohoist in lerna.json:

{
  "lerna": "2.0.0",
  "command": {
    "bootstrap": {
      "nohoist": [
        "node-pty",
        "electron-rebuild"
      ]
    }
  },
  "version": "1.0.1"
}
0reactions
lock[bot]commented, Dec 28, 2018

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a way to exclude a specific package from hoisting in ...
To hoist nothing, you may set hoist=false in .npmrc . To hoist only the babel packages, you may set hoist-pattern[]=@babel/*.
Read more >
nohoist in Workspaces | Yarn Blog
“nohoist” enables workspaces to consume 3rd-party libraries not yet compatible with its hoisting scheme. The idea is to disable the selected ...
Read more >
Manage build dependencies | Netlify Docs
Specify dependencies for your project so that our platform can install required ... You can override this by adding --no-ignore-optional to this variable....
Read more >
npm-install - npm Docs
By default, npm install will install all modules listed as dependencies in ... If set to false, then ignore package-lock.json files when installing....
Read more >
Advanced package manager features for npm, Yarn, and pnpm
In such situations, hoisting can lead to phantom dependencies and doppelgangers. ... .yarnrc.yml # alternatively, remove the next two lines, ...
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