{"id":677,"url":"https://github.com/felixrieseberg/npm-windows-upgrade","last_synced_at":"2025-10-03T15:30:19.073Z","repository":{"id":51727290,"uuid":"38216587","full_name":"felixrieseberg/npm-windows-upgrade","owner":"felixrieseberg","description":":rocket: Upgrade npm on Windows","archived":true,"fork":false,"pushed_at":"2021-05-10T13:07:29.000Z","size":794,"stargazers_count":2538,"open_issues_count":48,"forks_count":172,"subscribers_count":69,"default_branch":"master","last_synced_at":"2024-04-14T14:01:24.169Z","etag":null,"topics":["microsoft","nodejs","npm","windows"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felixrieseberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-28T22:27:41.000Z","updated_at":"2024-04-08T16:49:05.000Z","dependencies_parsed_at":"2022-08-03T07:00:30.389Z","dependency_job_id":null,"html_url":"https://github.com/felixrieseberg/npm-windows-upgrade","commit_stats":null,"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixrieseberg%2Fnpm-windows-upgrade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixrieseberg%2Fnpm-windows-upgrade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixrieseberg%2Fnpm-windows-upgrade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixrieseberg%2Fnpm-windows-upgrade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felixrieseberg","download_url":"https://codeload.github.com/felixrieseberg/npm-windows-upgrade/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235146487,"owners_count":18943266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["microsoft","nodejs","npm","windows"],"created_at":"2024-01-05T20:15:28.568Z","updated_at":"2025-10-03T15:30:18.453Z","avatar_url":"https://github.com/felixrieseberg.png","language":"JavaScript","funding_links":[],"categories":["Applications","JavaScript","Windows","Tips","nodejs","windows"],"sub_categories":["Development environment","Windows Manager","Update to the latest npm version"],"readme":"## Upgrade npm on Windows\n\u003ca href=\"https://ci.appveyor.com/project/felixrieseberg/npm-windows-upgrade/branch/master\"\u003e\u003cimg src=\"https://ci.appveyor.com/api/projects/status/8mk8qvno71xt30if/branch/master?svg=true\" alt=\"windows build status\" height=\"18\" /\u003e\u003c/a\u003e\n\u003ca href=\"http://badge.fury.io/js/npm-windows-upgrade\"\u003e\u003cimg src=\"https://badge.fury.io/js/npm-windows-upgrade.svg\" alt=\"npm version\" height=\"18\"\u003e\u003c/a\u003e \u003ca href=\"https://david-dm.org/felixrieseberg/npm-windows-upgrade\"\u003e\u003cimg src=\"https://david-dm.org/felixrieseberg/npm-windows-upgrade.svg\" alt=\"dependencies\" height=\"18px\"\u003e\u003c/a\u003e \u003cimg src=\"https://img.shields.io/npm/dm/npm-windows-upgrade.svg\" height=\"18px\" /\u003e\nUpgrading npm on Windows requires manual steps to ensure that PowerShell/CMD find the new version of npm. This is a small tool made with :heart: for npm and Node, reducing the process to a simple command.\n\n![](https://raw.githubusercontent.com/felixrieseberg/npm-windows-upgrade/gh-pages/screenshot.png)\n\n## Usage\nFirst, ensure that you can execute scripts on your system by running the following command from an elevated PowerShell. To run PowerShell as Administrator, click Start, search for PowerShell, right-click PowerShell and select `Run as Administrator`.\n\n```\nSet-ExecutionPolicy Unrestricted -Scope CurrentUser -Force\n```\n\nThen, to install and use this upgrader tool, run the following command (also from an elevated PowerShell or cmd.exe). Note: **This tool requires at least Node v8**, please [install an older version for older versions of Node.js](#older-nodejs-versions).\n\n```\nnpm install --global --production npm-windows-upgrade\nnpm-windows-upgrade\n```\n\nWant to just install the latest version? Sure:\n\n```\nnpm-windows-upgrade --npm-version latest\n```\n\nThe tool will show you a list of all the published and available versions of npm (including pre-release and beta versions). Choose the one you want to install and let it do its thing!\n\n#### Advanced Usage\nUsage: npm-windows-upgrade [options]\n\nOptions:\n```\n-h, --help                        Output usage information\n-V, --version                     Output the version number\n-d, --no-dns-check                Disable the internet connectivity test\n-e, --no-execution-policy-check   Disable the PowerShell execution policy test\n-p, --no-spinner                  Disable the spinner animation\n-n, --npm-path \u003cpath\u003e             (Optional) If passed, npm will be upgraded in the specified location\n-v, --npm-version \u003cversion\u003e       (Optional) If passed, npm will be upgraded/downgraded to the specified version\n```\n\nIf you have trouble with the script, consider adding parameters manually. A common issue is that the script fails to find npm (and therefore doesn't know where to install it) - in that case, pass the location manually.\n\n```\nnpm-windows-upgrade --npm-path \"C:\\nodejs\"\n```\n\nTo manually specify a version to install, pass the `version` parameter:\n\n```\nnpm-windows-upgrade --npm-version 5.5.0\n```\n\nTo override the internet connection check, pass `--no-dns-check`. To disable the initial prompt, pass `--no-prompt`.\n\n#### Debug Mode\nTo see debug output, set a `DEBUG` environment variable (`$env:DEBUG=\"npm-windows-upgrade\"`)\n\n## Issues \u0026 Support\nPlease do [report your issues on GitHub](https://github.com/felixrieseberg/npm-windows-upgrade/issues). There are a bunch of Windows versions, hundreds of different ways to install Node and npm, and it's likely that this script won't work with a few of them. If you run into trouble and need npm upgraded as soon as possible, [please follow the manual instructions](https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows).\n\nThis tool was made with :heart: for npm and Node, but it is provided \"as is\", without warranty of any kind, expressed or\nimplied. For details, please consult the `LICENSE` file.\n\n### Fix an Attempted Upgrade\nChances are that you attempted to upgrade npm before, it somehow failed, and you then went looking for this tool. If the tool fails to upgrade, it may be troubled by partial changes done during `npm install npm` or `npm upgrade npm`. In that case, you will have to completely uninstall Node:\n\n * Uninstall Node.js (select `Uninstall`, not the `Repair` option).\n * Go into `%programfiles%\\nodejs` and delete the entire folder.\n * Delete `%appdata%\\npm` and `%appdata%\\npm-cache`.\n * Edit your `PATH` and remove everything that references npm (to do so, hit \"Start\" and search for \"Environment Variables\").\n * Reinstall Node, then install this tool - and only use this tool to upgrade npm, do not attempt to run `npm install npm`.\n\n\u003e :memp: Used Chocolatey?\nIf you used Chocolatey (https://chocolatey.org/) to install Node.js, be sure to check if npm is removed from the `choco\\bin` directory by running the following command: `where.exe npm`. Should it still be there, you will need to either `choco uninstall npm` or delete the files from this bin directory.\n\n### Older Node.js Versions\n\n * For Node versions lower than v8.0, please use `npm-windows-upgrade@5.0.0`\n * For Node versions lower than v6.0, please use `npm-windows-upgrade@4.1.1`\n * For Node versions lower than v4.0, please use `npm-windows-upgrade@3.1.1`\n\n## More Useful Node.js Stuff\nMicrosoft is working hard to make sure that our users have the best possible experience with Node.js. For a helpful set of content that makes it easier to avoid any potential gotchas, [go check out our Node.js Guidelines](https://github.com/microsoft/nodejs-guidelines) - a collection of tips and advanced best practices!\n\n## Contributing\nContributions are extremely welcome! For JavaScript code, please run `grunt test` to check your code against JSCS and JSHint. There's no formal coding guideline for the PowerShell pieces of this tool, but do write code that is commented and comprehensible.\n\n## License\nMIT, please see `LICENSE` for details. Copyright (c) 2015 - 2017 Felix Rieseberg.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelixrieseberg%2Fnpm-windows-upgrade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelixrieseberg%2Fnpm-windows-upgrade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelixrieseberg%2Fnpm-windows-upgrade/lists"}