npx
npm command,
Syntax
npx <command> [args]
Parameters
| Parameters | Description | Examples | Level |
|---|---|---|---|
<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
- npx node_modules/.bin command
- npx
- npx,