Skip to content

Try our new Crash Courses!

Buy one of our new Crash Courses, now hosted on Teachable.

Run a local package – npm


To run a local package, enter the following command in your terminal:

npx package-name [options/arguments]


To run a package that was installed locally, you need to use the npx command (not npm).

As an example, if you were trying to run the create-react-app package to create a project called my-app, you would enter the following command into your terminal:

npx create-react-app my-app


Use the following command to run browser-sync locally:

npx browser-sync . -w


The npm Blog — Introducing npx: an npm package runner

Back to: npm Reference > npm Local Packages