NPX – run NPM packages locally without global installs

Newer versions of NPM come with a tool called NPX. You can use NPX to execute local copies of NPM packages.

This is especially helpful if you are developing in multiple projects, and have different versions of packages in them that you would run globally – such as gulp.

If you started with an older version of node and upgraded it to one that should contain NPX – such as Node v6.6 – check your NPM version. It may not be upgraded.

npm –version

If you need to upgrade only NPM, you can run:

npm install npm@[sem.ver.number] -g

This will update your global NPM version, and allow you to run NPX locally.

You can clean up any globally installed packages such as gulp, too!

npm uninstall gulp -g