Install npm on Windows 2026-07-06

By Xah Lee. Date: . Last updated: .

2026-07-06 this page is a log of upgrading node.js and npm on my Windows machine.

check existing npm

check if already installed and in environment variable $env:path.

npm powershell 2026-07-06 2a382 ll
npm powershell 2026-07-06 2a382 ll

check existing version number.

npm powershell 2026-07-06 2a943 ll
npm powershell 2026-07-06 2a943 ll

npm, PowerShell ExecutionPolicy problem

after install, got a problem running npm.

npm 2026-07-06 34144 ll
npm 2026-07-06 34144 ll
npm -v

npm: File d:\bin\node-v26.4.0-win-x64\npm.ps1 cannot be loaded. The file d:\bin\node-v26.4.0-win-x64\npm.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https://go.microsoft.com/fwlink/?LinkID=135170.
npm powershell 2026-07-06 33b7f ll
npm powershell 2026-07-06 33b7f ll

the Microsoft PowerShell ExecutionPolicy is lame. complex, not that useful in preventing malware, yet pain in the ass.

PowerShell unblock-file, Microsoft Zone.Identifier,

after fixing ExecutionPolicy, still problem.

npm powershell 2026-07-06 33ca3 ll
npm powershell 2026-07-06 33ca3 ll
npm powershell 2026-07-06 33cb0 ll
npm powershell 2026-07-06 33cb0 ll

PowerShell, what is local vs remote script

npm powershell 2026-07-06 2c77f ll
npm powershell 2026-07-06 2c77f ll

PowerShell unblock-file, Microsoft Zone.Identifier, file stream

and fuck, discovered microsoft files has hidden parts, the alternative data stream.

npm 2026-07-06 2d642 ll
npm 2026-07-06 2d642 ll

npm script

by the way, npm itself is nasty.

npm powershell 2026-07-06 2cc36 ll
npm powershell 2026-07-06 2cc36 ll

npm install tree.js

npm three js 2026-07-06 2ecd5 ll
npm three js 2026-07-06 2ecd5 ll

three.js dependency is 132 mega bytes.

npm 2026-07-06 2f18f ll
npm 2026-07-06 2f18f ll

npm tree js 2026-07-06 2f666 ll
npm tree js 2026-07-06 2f666 ll
Welcome to the Emacs shell

~/git/misc/three.js $ npm install

added 216 packages, and audited 217 packages in 1m

57 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm warn allow-scripts 1 package has install scripts not yet covered by allowScripts:
npm warn allow-scripts   puppeteer@25.3.0 (postinstall: node install.mjs)
npm warn allow-scripts
npm warn allow-scripts Run `npm approve-scripts --allow-scripts-pending` to review, or `npm approve-scripts <pkg>` to allow.
npm notice
npm notice New minor version of npm available! 11.17.0 -> 11.18.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.18.0
npm notice To update run: npm install -g npm@11.18.0
npm notice
~/git/misc/three.js $

"build": "rollup -c utils/build/rollup.config.js",

npm