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 add the root as a managed location?

See original GitHub issue

Expected Behavior

lerna link root’s dependencies to packages’ directories (FAQ.root-package.json)

Current Behavior

It’s not working

Possible Solution

symlink root binary to packages binary with a command. maybe like link-parent-bin

Steps to Reproduce (for bugs)

  1. create a monorepo(package.name: monorepo)
  2. create a package: lerna create demo
  3. install tslint in root dir: npm i -D tslint (I not found lerna command to add packages to root package.json)
  4. run lerna bootstrap: lerna bootstrap --hoist
  5. check tslint in demo dir: cd packages/demo, npx --no-install tslint -v
  6. log not found: tslint
lerna.json

{
  "packages": [
    "packages/*",
    "monorepo" // I also try input: "./", "./package.json", "./monorepo", 
  ],
  "version": "independent"
}

Context

Your Environment

Executable Version
lerna --version 3.13.1
npm --version 6.4.1
yarn --version VERSION
node --version 10.10.0
OS Version
Windows 10 1809

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
evocateurcommented, May 10, 2019

Yeah, probably should remove that bit from the FAQ.

0reactions
alviscommented, Dec 26, 2020

For anyone who really want to have the root managed but got stuck on having "." in the package list in lerna.json, I found a solution to avoid the postinstall/prepare loop during bootstrap. It is to ignore the root package by lerna bootstrap --ignore <root package name> in your postinstall/prepare life cycle script. It works for me and it hopes it works for you too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create the Key Distribution Services KDS Root Key
To create the KDS root key using the Add-KdsRootKey cmdlet · On the Windows Server 2012 or later domain controller, run the Windows...
Read more >
AWS account root user - AWS Identity and Access Management
Sign in to the IAM console as the account owner by choosing Root user and entering your AWS account email address.
Read more >
Install the Cisco Umbrella Root Certificate
Accept the default option, place all certificates in the following store (Trusted Root Certification Authorities), click Next, and then click Finish and OK....
Read more >
Manage your Android device's location settings - Android Help
Turn location on or off for your phone · Swipe down from the top of the screen. · Touch and hold Location ....
Read more >
20432: Acronis Backup & Recovery 10: Impossible to Save ...
Choose a different location or assign Local Administrator rights to Acronis ... to Save Backup to Root Directory from Management Server ...
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