From d89be460803ea513fa28fbcc47a189e1f008ff4c Mon Sep 17 00:00:00 2001 From: YIk Teng Hie Date: Sun, 31 Oct 2021 21:23:57 +0800 Subject: [PATCH] nvm update --- nodeJS/README.md | 94 +++++++++++++++++++++++++----------------------- 1 file changed, 50 insertions(+), 44 deletions(-) diff --git a/nodeJS/README.md b/nodeJS/README.md index 2d57c53..a3225cb 100644 --- a/nodeJS/README.md +++ b/nodeJS/README.md @@ -1,44 +1,50 @@ -# Javascript - -## Code Style - -* [Info](https://javascript.info/coding-style) -* [Google Style](https://google.github.io/styleguide/jsguide.html) -* [StandardJS](https://standardjs.com/) -* General guide - * Indentation : +2 spaces - * A line space between code block - * Column limit : 80 - * Use single quote `'` for strings - * Use `===` for equality check - * A space between `:` and value in key-value pair - -### [ESLint](https://eslint.org/) - -* Install package - -```sh -$ npm install -g eslint - -``` - -* Create `.eslintrc` config file - -```json -{ - "extends": "eslint:recommended", - "env": { - "browser": true, - "node": true, - "es6": true - }, - "rules": { - "no-console": 0, - "indent": 2 - } -} -``` - - - -* \ No newline at end of file +# Javascript + +## Code Style + +* [Info](https://javascript.info/coding-style) +* [Google Style](https://google.github.io/styleguide/jsguide.html) +* [StandardJS](https://standardjs.com/) +* General guide + * Indentation : +2 spaces + * A line space between code block + * Column limit : 80 + * Use single quote `'` for strings + * Use `===` for equality check + * A space between `:` and value in key-value pair + +### [ESLint](https://eslint.org/) + +* Install package + +```sh +$ npm install -g eslint + +``` + +* Create `.eslintrc` config file + +```json +{ + "extends": "eslint:recommended", + "env": { + "browser": true, + "node": true, + "es6": true + }, + "rules": { + "no-console": 0, + "indent": 2 + } +} +``` + + + +* NVM use issue + * Delete/remove/uninstall the version of node in your "C:\Program Files\nodejs" directory. To the point where there is no more "nodejs" directory at all. + * Delete the existence of nvm (C:\Users\xxx\AppData\Roaming\nvm), basically, manually delete the nvm dir. + * Download your desired version of nvm (https://github.com/coreybutler/nvm-windows/releases) + * Open a CMD prompt (run as administrator), and install the downloaded version of nvm, nvm-setup.exe, from within this CMD command prompt. + * From within the admin level command prompt, run "nvm install 7.2.1", or whatever node version you want to install. Probably you will be installing multiple versions, so repeat as needed. + * Now do the usual "nvm use ...", "nvm list", etc... \ No newline at end of file