Search code examples
node.jsnpx

What are all commands for npx create-*?


I know npx create-react-app and npx-next-app what are all others app npx support?


Solution

  • npx is a program that downloads any package on npm. create-react-app isn't a command for npx, rather, you're telling npx:

    1. Download react-create-app
    2. Cache it (but not in the current directory, so it will stay 'clean')
    3. Try to run it as a program (the package.json file says how to do that, in this case: "run node ./index.js")

    npx knows nothing of React or Next.js and it doesn't have these things built in. All it knows is about is npm and how to run any (executable) package it downloads from there, like npx gulp or npx serve.

    If you're working with a new framework and you're wondering if there's a utility to quickly set up a project, just search NPM and see what pops up.