Skip to content

Instantly share code, notes, and snippets.

@SilverSoldier
Last active January 16, 2018 05:29
Show Gist options
  • Save SilverSoldier/2185e84a68453e1a21d8959cc21bdd11 to your computer and use it in GitHub Desktop.
Save SilverSoldier/2185e84a68453e1a21d8959cc21bdd11 to your computer and use it in GitHub Desktop.
npm installing locally

Downloading node.js

1 Download the node.js tar file 2 Move it to a high level folder like tools 3 Untar 4 Also create a general template script called prepare_bash in the same location

npm installing something

1 Goto directory for that particular tool learning ex ~/learning/phoenix 2 Install whatever package needs to be installed using npm install <package-name> (omitting the -g) 3 To the template prepare_bash add the following line

export PATH=/home/<username>/learning/phoenix/node_modules/.bin:$PATH

4 Run the prepare_bash script before starting the project

export PATH=/home/<username>/tools/node-v<version-os-arch>/bin:$PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment