Learn about the npx Package Runner
1 min read

EGH NPM NPX Last week my latest Egghead.io course was launched entitled, Execute npm Package Binaries with the npx Package Runner.

npx is a tool that comes baked in npm (if you have version 5.2 or above), that you may or may not know about. It’s a handy little utility that enables you to play around with node packages in a way that wasn’t really easy before.

I find myself using npx all the time. It’s a tool I use most days.

🆓 The course is currently free to watch until Thursday November 15th. So, watch today!

Lessons

The following lessons are included in the npx course. For those that regularly use npm and npm scripts, lessons 1 and 2 are big improvements to your command-line workflow. Lessons 3 through 7 focus on uncovering some lesser known features of npx that I find are useful.

  1. Use npx to run locally installed node modules
  2. Use npx to Temporarily Install and Invoke a Package from npm
  3. Test Different Node Module Versions with npx
  4. Use npx to run commands with different Node.js versions
  5. Execute npx commands with \$npm_ Environment Variables
  6. Execute Code from a Remote GitHub Branch with npx
  7. Use npx to execute code from a GitHub gist

Having Fun with npx

As I teach npx I also try to keep things fun and faced paced. The following GIF shows a small clip from the 2nd lesson, Use npx to Temporarily Install and Invoke a Package from npm, where I experiment with various packages without installing them globally.

Who knew devpun, cowsay, and lolcatjs could be so fun!?!

Course Reviews

Some reviews have already started coming in for this course. The following is a taste of what some are saying thus far.

“So many great little tips! Plus it was short and easily-digestible. Lots of this is immediately-applicable to our team, and lots of it is fun to know.”

“I seriously had no idea npx was capable of so much. Nicely done!”

“Elijah’s instructions are clear, sufficiently detailed and unambigous. I can’t wait to put my learning to good use. Thanks a lot for this wonderful course.”

“The course contains a lot of useful information and the presentation of the instructor is engaging. Thank you!”

Conclusion

I hope you enjoy the course and find something useful that you can start using in your projects.

Edit post on GitHub


Make a zsh function alias to enforce using yarn commands when in a yarn project
Reusable State and Effects with React Hooks