Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

223
Views
bash: "command not found" after installing a package in nodenv e.g. mocha, pm2

As example I will use pm2. I can't run the command pm2 on my nodenv nodejs installation. It will return:

$ pm2 -v
$ bash: pm2: command not found

further:

$ which pm2

does not return anything. What am I missing?

I installed it as the documentation suggested:

$ yarn global add pm2
about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Ok there are several pitfalls here:

  1. It looks like nodenv does not support yarn global package installations: Github issue from 2018, looks like it has not been implemented
  2. If you install a package with npm -g option you HAVE TO do nodenv rehash in order for the command to work in bash.
about 4 years ago · Santiago Gelvez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!