npm install, o npm -v, o sudo npm install faz nada

0
~/nodecode$ sudo apt-get install 

npm is already the newest version. 0 to upgrade, 0 to newly install, 0 to remove and 17 not to upgrade.> Done Building dependency tree Reading state information...

Tendo estabelecido que o npm está instalado, não sei porque nenhum dos comandos listados faz nada. O que estou perdendo?

    
por JohnnyBizzle 17.04.2017 / 00:03

1 resposta

0

sudo su

root@PC_NAME:/home/# : sudo apt-get

Você precisa ter uma pasta nodecode no diretório que você terá

bash: /root/nodecode$: No such file or directory

Informação:

apt-get is a command line interface for retrieval of packages and information about them from authenticated sources and for installation, upgrade and removal of packages together with their dependencies.

npm is installed with Node.js npm is distributed with Node.js- which means that when you download Node.js, you automatically get npm installed on your computer. For checking the version of npm

StepI Instale seu nodejs

link

Ubuntu

Execute o seguinte na sua linha de comando para instalar a origem do nodejs

curl -sL https://deb.nodesource.com/setup | sudo -E bash -

Em seguida, execute isso para obter o pacote nodejs mais recente

sudo apt-get install -y nodejs

Etapa II Verifique se você tem o nó e o npm instalados

Para verificar se você tem o Node.js instalado, execute este comando no seu terminal:

node -v

Para confirmar que você tem o npm instalado, você pode executar este comando no seu terminal:

npm -v

Uma nota nas versões

versões npm

npm is a separate project from Node.js, and tends to update more frequently. As a result, even if you’ve just downloaded Node.js (and therefore npm), you’ll probably need to update your npm. Luckily, npm knows how to update itself! To update your npm, type this into your terminal:

npm install npm@latest -g

Node versions and Long Term Support Node.js has lots of versions! To use Node.js, and therefore npm, effectively, you’ll want to make sure that you are on a version that is supported by the Node.js team. In general, you should use the version of Node.js labelled “LTS”.

Use a Node.js version manager Software is always changing, and so it’s often a good practice to use a version manager to help account for this change. For this reason (and many others!) we recommend that you use a version manager for your Node.js installation. There are many great options; here are a few*:

NVM

nodist

n

nave

Todas as referências de

insira a descrição do link aqui

    
por Koustubh G. 07.03.2018 / 07:05