https://github.com/cyfung1031/npm-on-windows
This is the guideline for nodejs + npm installation on Windows (including windows 7)
https://github.com/cyfung1031/npm-on-windows
Last synced: about 1 month ago
JSON representation
This is the guideline for nodejs + npm installation on Windows (including windows 7)
- Host: GitHub
- URL: https://github.com/cyfung1031/npm-on-windows
- Owner: cyfung1031
- Created: 2021-09-01T01:01:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-13T02:38:19.000Z (over 3 years ago)
- Last Synced: 2025-02-12T13:26:22.632Z (3 months ago)
- Size: 62.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# npm-on-windows
This is the guideline for nodejs + npm installation on Windows (including windows 7)# Description
npm and Node.js are quite common to the developers but they are unfriendly to Windows.If you use .msi installation, it usually fails. (see https://github.com/npm/npmlog/issues/48)
Here is to introduce a proper method for its installation.
# Official Files
| Item | Version | Release Date | Download |
| ---------------------- | -------------- | ------------- | -------------------------------------------------------------------- |
| Node.js (Windows 7) | v12.22.6 (LTS) | 31-Aug-2021 | https://nodejs.org/download/release/v12.22.6/win-x64/node.exe
2E820E1C7688484024BFAF13E8F9E11F - 28.8 MB |
| Node.js (Windows 8.1+) | v14.17.6 (LTS) | 31-Aug-2021 | https://nodejs.org/download/release/v14.17.6/win-x64/node.exe
|
| npm (Windows 7+) | 1.4.9 (zip) | 01-May-2014 | https://nodejs.org/dist/npm/npm-1.4.9.zip
7CD8BA6F4582C81709B6705978B4B9ED - 2.19MB |## Node.js v13?
* Last installable Node.js on Windows 7 is v13.14.0 ( see [Install Node.js on Windows 7](https://www.centennialsoftwaresolutions.com/post/install-node-js-on-windows-7) )
* There is no LTS version in v13 ( https://nodejs.org/en/blog/release/ )
* Up to 2021-09-01, Node.js's [Committee](https://nodejs.org/en/about/community/) has chosen to maintain v12 LTS instead of v13
* Therefore, it is highly not recommended to install any v13 version## npm 1.4.9?
* This is the last official release of npm in the form of zip file (old `npm.cmd` and old `node_modules`)
* We use this old tool to install the new npm
* Delete npm 1.4.9 after installation of new npm## Official Releases
* List of releases: https://nodejs.org/en/blog/release/
* List of downloads: https://nodejs.org/en/download/releases/## Screenshot 1
* https://nodejs.org/en/blog/release/
## Screenshot 2
* https://nodejs.org/en/download/releases/
# Installation Guide for Node v12
see https://github.com/cyfung1031/npm-on-windows/blob/main/README_backup_20211013.md
# Installation Guide for Node v14.17.6 on windows 7
The following installations is to Node.js v14.17.6 and npm v6.14.15.
(For your own installation, you shall refer the corresponding npm version in https://nodejs.org/en/download/releases/ )
## Part A - Basic Files for nodejs and npm
1. Download https://nodejs.org/download/release/v14.17.6/node-v14.17.6-win-x64.zip
2. Extract the files `node.exe`, `npm.cmd`, and `node_modules` into `C:\nodejs`
3. Add System Variable `NODE_SKIP_PLATFORM_CHECK` = `1`
Go to control panel -> System -> **Advanced System Settings** then environment variables.
under **system variables** i created a new one with `NODE_SKIP_PLATFORM_CHECK` and set its value to `1`.4. Open **[cmd](https://www.lifewire.com/how-to-open-command-prompt-2618089)** and type to check the following:
```
C:
cd nodejs
node -v //display "v14.17.6"
npm -v //display "v6.14.15"
```## Part B - Set your folder locations
1. Create Empty Directories `C:\nodejs\node_global` and `C:\nodejs\node_cache`
2. add PATH `C:\nodejs\\;C:\nodejs\node_global\\;`

3. add system variable "NODE_PATH" as `C:\nodejs\node_global\node_modules`

4. Open **[cmd](https://www.lifewire.com/how-to-open-command-prompt-2618089)** and type to check the following:
```
npm config set prefix "C:\nodejs\node_global"
npm config set cache "C:\nodejs\node_cache"
```
> - Note 1: As you have added the path `C:\nodejs\` to your system environment, `C: cd nodejs` is no longer required.
> - Note 2: You can edit the text file `%HOMEPATH%\.npmrc` for the same effect.## Part C - Install the npm to node_global
1. Type the following to install the npm in your `C:\nodejs\node_global`
```
npm install -g [email protected]
```
> - Note: You can find `npm.cmd` and `npx.cmd` in `C:\nodejs\node_global` after installation2. Remove the unnecessary old npm files in "C:\nodejs" - leaving only "node.exe", "node_global" and "node_cache"
3.
3. Open **[cmd](https://www.lifewire.com/how-to-open-command-prompt-2618089)** and type to check the following:
```
cd nodejs
node -v //display "v14.17.6"
npm -v //display "v6.14.15"
```# Appendix
## Install Yarn
```
npm install --global yarn
```## Install Vue CLI
```
npm install --global @vue/cli
```* It is highly recommended to use `vue create XXXXX --packageManager npm` instead of yarn
* Default Profile for PackageManager: `%HOMEPATH%\.vuerc`## Install A Package Locally
```
npm install xxxx
```
## Run A Package Installed Locally
```
npx xxxx .....
```## VS Code
```
cd xxxxx
code .
```