![]() ![]() So, when you run the installer simply point it to %appdata% and avoid all this.Īnd note that this isn't anything wierd - it’s what would happen if you ran the installer with just user priveleges. This creates a mess as all modules go into %appdata%, and when you upgrade NPM itself - which NPM themselves recommend you do right away - you end up with two copies: the original still in 'program files' since NPM can't erase that, and the new one inn %appdata%.Įven worse, if you mistakenly perform NPM operations as admin (much easier on Windows then on *nix) then it will operate on the 'program files' copy of NPM node_modules. The default MSI installer puts Node and the NPM that comes with it in 'program files' and adds this to the system path, but it sets the user path for NPM to %appdata% (c:\users\appdata\roaming) since the user doesn't have sufficient priveleges to write to 'program files'. Re-start the command prompt and npm will now work.Įverything should be installed in %appdata% (C:\Users\\AppData\Roaming), not 'program files'. Select Command Prompt (Admin) to launch a command prompt with elevated (admin) privileges. Manually go into the AppData directory and you will find that there is no npm directory inside Roaming. Install Node.js Using Chocolatey We are ready to install Node.js from the command line Press Win X on your keyboard to bring up the Power User Menu in Windows. If Node.js is installed successfully then. ![]() Navigate to the Node. Once you install Node.js on your computer, you can verify it by opening the command prompt and typing node -v. Now that the PATH variable is set correctly, you will still encounter errors. One of the useful things about installing Node.js on Windows is that a convenient installer is provided. If the PATH variable is empty, change it to this: C:\Users\\AppData\Roaming\npm C:\Program Files\nodejs Control Panel -> System -> Advanced system settings -> Environment Variables.Install it anywhere you want, by default: C:\Program Files\nodejs.download the 64 bits version, 32 is for hipsters.It seems like new installers do not have this problem anymore, see this answer by Parag Meshram as my answer is likely obsolete now.
0 Comments
Leave a Reply. |