npx

npm command,

Syntax

npx <command> [args]

Parameters

ParametersDescriptionExamplesLevel
<command> command npx create-react-app my-app Common
-p <package> npx -p typescript tsc --init Advanced
--yes npx --yes create-next-app Common
--no-install npx --no-install eslint . Advanced

Examples

React

npx create-react-app my-app
create-react-app

npx eslint src/
eslint

npx node@16 -e "console.log(process.version)"
Node 16

TypeScript

npx tsc --init
tsconfig.json

Common Errors

command not found,
Need to install the following packages, y

Tips

Related Commands