How can I update NPM to the next version?

How do I update npm?

npm install -g npm

Please note that this command will remove your current version of npm. Make sure to use sudo npm install -g npm if on a Mac.

You can also update all outdated local packages by doing npm update without any arguments, or global packages by doing npm update -g.

Occasionally, the version of npm will progress such that the current version cannot be properly installed with the version that you have installed already. (Consider, if there is ever a bug in the update command.) In those cases, you can do this:

curl https://www.npmjs.com/install.sh | sh

WampServer Error: ( ! ) Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

You’re using WampServer and you may of recently moved your local host website files into OneDrive.

You now receive the error:

( ! ) Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

( ! ) Fatal error: Unknown: Failed opening required ‘D:/OneDrive/WAMP/WWW/site/index.php’ (include_path=’.;C:\php\pear’) in Unknown on line 0

The problem is probably caused by your local WampServer’s PHP being unable to work with OneDrive.

The solution is to upgrade the version of PHP for your WampServer.

To do this, visit http://wampserver.aviatechno.net/ and download a more recent version of PHP, from from 7.2.25 onwards. Once the .exe downloads, open it, and follow the prompts.

You may be prompted that your version of WampServer is not compatible with the PHP upgrage package.

The solution to this is to download a newer version of WampServer through an upgrade package. Download Wampserver update 3.2.0, run the file, then run the PHP updater.

If, when you go to start WampServer again, you receive an error about a missing images_on.bmp file, simply duplicate c:\wamp\images_off.bmp into c:\wamp\images_on.bmp, and try again.