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.

lerna: command not found on ubuntu 20.04 LTS

See original GitHub issue

Expected Behavior

After running yarn global add lerna and lerna --version The Lerna version should be displayed on the terminal

Current Behavior

Running lerna --version displays lerna: command not found

Steps to Reproduce (for bugs)

  1. Install yarn version 1.22.5 on ubuntu 20.04 LTS
  2. yarn global add lerna
  3. lerna --version
lerna.json

{
  "packages": [
    "src/packages/*"
  ],
  "npmClient": "yarn",
  "useWorkspaces": true,
  "version": "independent",
  "command": {
    "publish": {
      "yes": true,
      "conventionalCommits": true,
      "registry": "https://registry.npmjs.org",
      "message": "docs: changelog [skip ci]"
    }
  }
}

Context

I’m trying to run an app locally and setting up lerna is a part of that process.

Your Environment

yarn 1.22.5 node v14.13.0 npm 6.14.8

| OS | Version | | ubuntu | 20.04 LTS

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

8reactions
ijiki16commented, Sep 17, 2021

This worked for me. @tafadzwagonera @Nocturnal-2

unistall:

yarn global remove lerna

install:

sudo yarn global add lerna

Markdown Monster icon

1reaction
leviathanbeakcommented, Mar 12, 2021

Hi, this worked for me $ npm config get prefix the output should be something like /home/<user>/.npm-global

then run $ export PATH=$PATH:~/.npm-global/bin

and your global deps should be available, of course in order to persist this change, save this PATH to .bashrc

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to run lerna's command - node.js - Stack Overflow
In my case, I just run sudo npm install --g lerna , and it works ... if the path is correctly setup or...
Read more >
lerna: command not found error [Solved] | bobbyhadz
Use npx to solve the error "lerna: command not found", e.g. npx lerna --version or install the package globally by running npm install...
Read more >
Add executable to Ubuntu-latest PATH using GitHub workflow
Your app's executable and dependencies can exist in the same directory together, yet they don't clutter /usr/local/bin .
Read more >
node.js | how to install pm2 in ubuntu 20.04 - YouTube
PM2 command not found - node.jshow to install pm2 in ubuntu 20.04 Please do like share and comment if you like the video...
Read more >
lerna - npm
Lerna is a fast modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository. NPM Status CI Status ...
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