Skip to main content

npm package management

A summary of Node package commands

Short cut commands

npm install <package>

npm i <package>

npm install --save <package>

npm i -S <package>

npm install --save-dev <package>

npm i -D <package>

npm install --global <package>

Install node via Homebrew including npm install: could not symlink error

Step 1: Install Homebrew

Homebrew is the missing package manager for macOS.

As per the Homebrew site, paste the following in a macOS Terminal prompt.

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

This acton will install Homebrew on your OSX.  Using the following command you can check the brew version

$ brew -v

 

Installing Node and npm on CentOS 7

Working on a new CentOS 7 server, Node wasn't installed.  You can quickly this through using the prompt node -v

node not found

In Plesk, the extension had been installed, however this doesn't mean correctly.  So I needed to install Node and npm on the CentOS 7 server.

 

npm error config/core.js missing

I started out with a simple task... install Tailwindcss.  What unfolded is something that many of us have experienced time and time again.

For anyone that has completed this task before knows that through shell the command is

Subscribe to nodejs