The article was originally published by SZHSHP’s Third Institute for Border Studies

Development background

The blog had been using Jekyll, and suddenly wanted to play with NodeJS and Hexo, so I tried to build it

Green environment, Window8 based, do not require administrator rights

The point is that no administrator privileges are required!!!!

# # NodeJS installation

Mainly ontology and NPM

Current version:

Node -v v6.9.4 NPM -v 4.1.1Copy the code

NodeJS Installation

Download the latest Node.exe from the official website

NPM Installation

  1. Download the latest npm release from GitHub ( https://github.com/npm/npm/releases )
  2. Create folders c:\nodejs\node_modules and c:\nodejs\node_modules\npm
  3. Unzip the downloaded zip file in c:\nodejs\node_modules\npm folder
  4. Copy npm and npm.cmd files from c:\nodejs\node_modules\npm\bin to c:\nodejs folder

Once setup is done, it can be used to install/uninstall packages locally or globally. For more information on using npm visit docs.npmjs.com/.

As the final step you can add node’s folder path c:\nodejs to the path environment variable so that you don’t have to specify full path when running node.exe and npm at command prompt.

Taobao mirror

Go directly to their website: https://npm.taobao.org/

The environment variable

Use the NodeJS directory as path every time in CMD

SET PATH=C:\Users\xxxx\Desktop\NodeJS; %PATH%Copy the code

Then both the Node and NPM commands can be used directly

Note that the path is cancelled after each call. You can write a BAT to automatically run each time

reference

how-to-use-npm-with-node-exe