

You may run into a variety of issues with the older versions as they may be missing functionality webpack and/or its related packages require. The current Long Term Support (LTS) release is an ideal starting point. Prerequisitesīefore we begin, make sure you have a fresh version of Node.js installed. Run the following command to see where npm will install global packages to verify it is correct.This guide goes through the various methods used to install webpack. There was a bug in some versions of npm that kept this from working, so you may need to go in and fix that up by hand. When npm is used to install itself, it is supposed to copy this special builtin configuration into the new install.

The Node installer installs, directly into the npm folder, a special piece of Windows-specific configuration that tells npm where to install global packages. (See also the point below if you're running Windows 7 and don't have the directory %appdata%\npm.) A brief note on the built-in Windows configuration

Copy the npmrc file back into %ProgramFiles%\nodejs\node_modules\npm.

This will tell the new npm where the global installed packages are.
