devspace-sh / devspace

DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
https://devspace.sh
Apache License 2.0
4.31k stars 361 forks source link

Unable to find global npm/yarn dir #2357

Open marcus-sa opened 2 years ago

marcus-sa commented 2 years ago

What happened?
Unable to use any CLI commands at all. I just get the following error:

Finishing installation of DevSpace CLI
Unable to find global npm/yarn dir

What did you expect to happen instead?
For it to work, or at least provide a debuggable error message.

How can we reproduce the bug? (as minimally and precisely as possible)
Install Node.js & Yarn using https://volta.sh/ Install the DevSpace CLI Run any CLI command.

My devspace.yaml:

version: v2beta1
...

Local Environment:

Anything else we need to know?

/kind bug

bagulm123 commented 2 years ago

Hi @marcus-sa

Thanks for reporting the issue.

I have taken below steps and it seems its working.

  1. curl https://get.volta.sh | bash
  2. volta install node
  3. volta install yarn
  4. volta install devspace
  5. devspace version
❯ devspace version
Finishing installation of DevSpace CLI
Running: node /home/mahendra/.volta/tools/image/packages/devspace/bin/../lib/node_modules/devspace//index.js finish-install /home/mahendra/.volta/tools/image/packages/devspace/bin

################################################
WARNING: npm binary directory NOT in $PATH environment variable: /home/mahendra/.volta/tools/image/packages/devspace/bin
################################################

Download DevSpace CLI release: https://github.com/loft-sh/devspace/releases/download/v6.1.1/devspace-linux-amd64

DevSpace version : 6.1.1

Did you take these steps or something very specific? By the way, I am on linux.