In this little article, we show how to install NPM on Windows using Chocolatey, which is a Linux-like packet manager like apt-get, yum & Co.

choco install -y nodejs-lts --force

Step 0: Decision: why not using VS Code or WebStorm in your Browser?

The quickest way of starting developing with the latest stable NPM is this: just develop a browser and choose between VS Code, WebStorm or IntelliJ:

More information…

… you still would like to install NPM on your Windows system? Okay, then let us install NPM on Windows using chocolatey:

Step 1: Install Chocolatey on Windows

We are following the installation instructions on https://chocolatey.org/install:

Step 1.1: Start Powershell as Admin

Start Windows Powershell ISE as Administrator
Starting Powershell on Windows 10
Starting Powershell on Windows 11
Starting Powershell on Windows 11

Windows Search on the lower left: PowerShell –> right-click ‚Window Powershell ISE ‚  -> run as Administrator

Step 1.2: Install

Get-ExecutionPolicy

# output: Restricted

If the output is Restricted, then:

Set-ExecutionPolicy AllSigned

You will be prompted, whether you really, really want to do it. Then say Yes, all.

Then we install Chocolatey:

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

The output looks similar to:

# Output:
orcing web requests to allow TLS v1.2 (Required for requests to Chocolatey.org)
Getting latest version of the Chocolatey package for download.
Not using proxy.
Getting Chocolatey from https://community.chocolatey.org/api/v2/package/chocolatey/1.2.0.
Downloading https://community.chocolatey.org/api/v2/package/chocolatey/1.2.0 to C:\Users\olive\AppData\Local\Tem
p\chocolatey\chocoInstall\chocolatey.zip
Not using proxy.
Extracting C:\Users\olive\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip to C:\Users\olive\AppData\Lo
cal\Temp\chocolatey\chocoInstall
Installing Chocolatey on the local machine
Creating ChocolateyInstall as an environment variable (targeting 'Machine') 
  Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
WARNING: It's very likely you will need to close and reopen your shell 
  before you can use choco.
Restricting write permissions to Administrators
We are setting up the Chocolatey package repository.
The packages themselves go to 'C:\ProgramData\chocolatey\lib'
  (i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
  and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.

Creating Chocolatey folders if they do not already exist.

WARNING: You can safely ignore errors related to missing log files when 
  upgrading from a version of Chocolatey less than 0.9.9. 
  'Batch file could not be found' is also safe to ignore. 
  'The system cannot find the file specified' - also safe.
chocolatey.nupkg file not installed in lib.
 Attempting to locate it from bootstrapper.
PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding...
WARNUNG: Not setting tab completion: Profile file does not exist at 'C:\Users\olive\OneDrive\Dokumente\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1'.
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
 first prior to using choco.
Ensuring Chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder

Step 2: Uninstall NodeJS, if installed

Windows Uninstall NodeJS
Windows 10
Windows 11

 

Search -> programs -> search for NodeJS -> right-click (if found) –> uninstall

Step 3: Install NodeJS

In the Admin Windows Powershell, perform the command (the --force option is needed only if the installation was attempted unsuccessfully before already).

choco install -y --force nodejs-lts 
# use nodejs instead of nodejs-lts for the latest unstable version instead, if you want to take the risk

It seems that choco install is installing the latest (unstable) NodeJs version. Please check on https://nodejs.org/en/download/ to find the latest stable LTS version. To install a specific version, use following command instead:

choco install -y --force nodejs@v12.13.0

Step 4: Check NodeJS Version

Open a GIT Bash or an MSDOS window (search „Git Bash“ or CMD“):

node -v
# output: v18.12.1

Step 5: Check NPM Version

The chocolatey installation of NodeJS also installs and activated NPM by default. We can check the version of NPM as follows:

# install npm
npm i -g npm 

# check version:
npm -v
# output:
8.19.3

Step 6 (optional): Install Angular CLI

npm i -g @angular/cli@8.3.19
# or for the latest version:
# npm i -g @angular/cli

# output:
C:\Users\olive\AppData\Roaming\npm\ng -> C:\Users\olive\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng

> @angular/cli@8.3.19 postinstall C:\Users\olive\AppData\Roaming\npm\node_modules\@angular\cli
> node ./bin/postinstall/script.js

+ @angular/cli@8.3.19
added 102 packages from 108 contributors and updated 7 packages in 25.591s

Done

35 comments

  1. Looking best call girls near your area where you are located. Hurry up pick up your phone in your hand and call me my mobile number is mentioned on website, we assured you that we will provide you best call girls like call girls, bhabhi, aunty, teen, model, Russian at affordable price .

    https://www.lucknowcallgirls.online/
    https://www.lucknowcallgirls.online/call-girls-in-charbagh/
    https://www.lucknowcallgirls.online/call-girls-in-gomti-nagar/

  2. Thanks for sharing Valuable Information.
    https://jebbidan.editorx.io/hadsis/forum/general-discussions/1-877-777-6162-flight-change-allegiant-airlines-change-flight-policy
    https://blogzone.hellobox.co/6885118/1-877-777-6162-allegiant-airlines-name-change-or-correction-on-ticket
    https://forums.black-dog.tech/index.php?threads/1-877-777-6162-allegiant-airlines-name-correction-on-ticket.2411/
    https://www.whizolosophy.com/category/determination-achievement/article-essay/different-methods-to-change-name-on-spirit-airlines-flight-booking
    https://www.bookmarkinger.com/stories/1-1877-777-6162-how-to-change-name-on-delta-ticket/
    https://uoc-sandbox.powerappsportals.us/en-US/forums/general-discussion/557951dc-014c-ef11-b4ae-001dd809ccf3
    https://uoc-sandbox.powerappsportals.us/en-US/forums/general-discussion/bdf04f76-ae4d-ef11-b4ad-001dd806fbed
    https://uoc-sandbox.powerappsportals.us/en-US/forums/general-discussion/cf18131b-614e-ef11-b4ad-001dd806fbed
    https://writers.coverfly.com/projects/view/cf376368-0276-4f7c-a435-c656f7e6cd6a/Can_I_cancel_my_Japan_flight_and_get_a_full_refund_18777776162#
    https://uoc-sandbox.powerappsportals.us/en-US/forums/general-discussion/cb5ecbe7-0550-ef11-b4ad-001dd806fbed
    https://uoc-sandbox.powerappsportals.us/en-US/forums/general-discussion/b6607b7b-cb50-ef11-b4ae-001dd809885f
    https://uoc-sandbox.powerappsportals.us/en-US/forums/general-discussion/2ef61b2f-1c53-ef11-b4ae-001dd809885f
    https://uoc-sandbox.powerappsportals.us/en-US/forums/general-discussion/69ddfe20-a354-ef11-b4ae-001dd809885f

  3. Moreover, you will definitely find the benefits and of course the various types of service options available. For players of the newest online slot games, of course you will get all the newest online games from us, one of which is. With attractive land shapes and features as well as the addition of the largest online slot jackpot. For further information, you can visit our website jawara88

Comments

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.