Comments (5)
Hey, if you didn't attempt to install npm with npm install -g npm
, everything is fine. Even if you did, things are still okay - Windows will however use the npm installed with Node.js instead, since the official Node.js installer references the Node directory in PATH
before the global AppData directory.
This installer is trying to minimally invasive and upgrade the npm version inside the Node.js folder (which should be the one installed used anyway, unless the user provisioned npm or node him/herself.)
If Windows is already using the one in %appdata%\npm\node_modules\npm
, the installer is actually not required - and a simple npm install -g npm@latest
is enough to upgrade.
Does that make sense? Or did I misunderstand you?
from npm-windows-upgrade.
I have used npm install -g npm
, the main issue with this method is the npmrc file gets removed during the install. This breaks npm until you replace the npmrc file.
If this tool was only meant to upgrade npm in the Node.js folder and nodejs\node_modules\npm
is the npm instance we should be using, I'm happy with that as the solution 👍
from npm-windows-upgrade.
Good point. I don't want to put myself or Microsoft into the position of telling people how to use npm. I can probably get the path of the npm
installation used and update that one.
from npm-windows-upgrade.
If I am understanding everything correct, I believe the pull request I sent that was integrated should be causing the default behavior now to first query the first npm in your path for its global install location via -
npm config --global get prefix
I'd expect this to return the AppData
path if that's the install you have, although my current setup is installed at another location within my home directory so I can't test that assumption very well at the moment. Perhaps this issue is fixed?
from npm-windows-upgrade.
I assume this issue is fixed no - if we fail with installing npm in AppData, we're now also installing the desired version in the NodeJS folder. I'll close this as fixed.
Thanks everybody!
from npm-windows-upgrade.
Related Issues (20)
- Scope specified more than once (powershell)
- Error: spawn powershell.exe ENOENT HOT 4
- I got this error at the time of run command "ng serve --open". HOT 1
- expo start not opening project
- npm install
- Can't update problem (even for admin) HOT 2
- npm ERR! cb.apply is not a function While trying to Update the Npm the Windows way. HOT 1
- Failed to upgrade from 6.14.6 to 6.14.8 HOT 2
- Error: Npm start
- Error to upgrade: from 6.14.8 to the latest
- npx create-react-app => Error EINTEGRITY
- Cannot find module 'npm-windows-upgrade.js'
- You wanted to install npm 7.6.1, but the installed version is 6.14.11. HOT 2
- "Scripts cannot be executed on this system." on pwsh 7 if process scope is not Unrestricted
- npm install express --save Error
- npm ERR! code EINTEGRITY
- failed to upgrade npm
- while enter npm start for runt a react app it shows error like this
- Cannot install latest version on Windows HOT 1
- Can't execute npm-windows_update
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npm-windows-upgrade.