npx क्या है
npx permanently install किए बिना एक package का command चलाता है।
In this page:
Syntax
npx package_name arguments
npx
npx temporarily एक package download करता है (या एक local वाला इस्तेमाल करता है) और इसका binary चलाता है। यह create-react-app जैसे scaffolding tools या one-off tasks के लिए ideal है। node_modules/.bin में local binaries भी npx से मिलते हैं।
Note:
आप जो version चलाते हैं उसे pin करने के लिए npx package@version इस्तेमाल करें।
उदाहरण: npx
$ npx cowsay "Hello npx"
$ npx eslint .
$ npx create-vite@latest my-app
$ npx --yes serve .
⚠️ Run this in your own terminal or Node.js environment.
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the
view already swaps in the hi_ translation fields (or blanks these
out if untranslated), so this renders correctly for both languages
without a lang_code check here. #}
आम गलतियां
- यह मान लेना कि npx globally install करता है
- untrusted packages blindly चलाना
- यह भूल जाना कि version runs के बीच बदल सकता है
चैप्टर सारांश
- npx package binaries चलाता है
- कोई permanent install चाहिए नहीं
- Local node_modules/.bin tools ढूंढता है
- Repeatability के लिए versions pin करें
🔒
Chapter Quiz — Complete all 7 topics to unlock
0/7 topics done
Complete these topics first: