Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

286
Visualizações
How to get NPM working on Linux

I've been using node.js and npm on Windows for some time and everything worked well, untill I tried to do the same thing on linux.

My goal:

Use node.js along with npm on linux.

What I did:

I downloaded tar.gz file from node.js website and I unpacked it. I have a folder (that unpacked tar.gz) and my guess is that that's it, seems I just need to run "node" file from node.js/bin/ folder to execute javascript files.

I never really thought about what this "npm" really is, on Windows I would simply run cmd from xampp, write npm install and everything would work fine. I found some link to npm-cli.js file in the same folder where "node" file is. I guess what used to be "npm install ..." now is "node npm install ..." since it's a js file.

I am confused about where exactly packages are supposed to be installed. There are few node_modules folders and when I run node npm install a progress bar appears and gets stuck right away, nothing happens.

So I have 2 problems

  • how to get npm working?
  • where is this "node_modules" folder?

I've looked some tutorials but there is no "./configure" file, make install etc doesn't work.

I'm new to linux so I'm probably making some obvious mistakes. Can someone explain this to me?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

For development on Linux or OSX I suggest using nvm instead of getting the binaries. Linux and OSX are a bit different from Windows in a sense that you don't always need to install programs as the compiled binaries themselves are usually enough.

To install, open a Terminal and paste:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash

restart the terminal to make sure you reload the configuration or source your config, then run:

nvm install v5.7.0
nvm alias default v5.7.0

And you're done!

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda