Questions tagged [npx]

npx is a npm package runner that executes a (e.g. npm package binaries) either from a local `node_modules/.bin`, or from a central cache, installing any packages needed to run the .

npx is a npm package runner that executes <command> (e.g. npm package binaries) either from a local node_modules/.bin, or from a central cache, installing any packages needed to run the <command>.

npx was introduced with npm@5.2.0 as a tool intended to help round out the experience of using packages from the npm registry. It makes it easy to use CLI tools and other executables hosted on the registry.

Further Links:

796 questions
26
votes
2 answers

Where does NPX store binaries after installation?

If I'm using npx to run a binary as a one-off, it'll output the following: npx my-module /// npx: installed 1 in 1.34s /// Hello, from my module! Where are these binaries stored by default? Does npx save the binaries after execution, a-la npm or…
Harrison Cramer
  • 3,792
  • 9
  • 33
  • 61
24
votes
2 answers

Why does npx install webpack every time?

I have a JavaScript app I'm bundling with webpack. Per the docs, I'm using this command to start bundling: npx webpack Each time I get this output: npx: installed 1 in 2.775s I've verified that the webpack command exists in my ./node_modules/.bin…
serverpunk
  • 10,665
  • 15
  • 61
  • 95
22
votes
1 answer

Is there any npx create react app equivalent for vue cli?

I want to install vue for my project through npx, not globally and to be sure that I have the latest version of vue.js, just like is done in react. What is the command in the terminal to achieve that?
user29249
  • 323
  • 1
  • 2
  • 4
21
votes
7 answers

Tailwind in React project - getting "Cannot find module 'autoprefixer'" error during setup

I'm following the documentation for setting up Tailwind in a React project over on https://tailwindcss.com/docs/guides/create-react-app. I've been following the steps, but when I get to the part where I'm supposed to run npx tailwindcss init in…
19
votes
6 answers

Windows 10 -> 'npx create-react-app myapp' command does not work because of whitespace username in file path

I ran into some issues when trying to install a react app on my Windows 10 via npx create-react-app appname, receiving the following error message: Error: EPERM: operation not permitted, mkdir 'C:\Users\Daniel' TypeError: Cannot read property…
Daniel
  • 963
  • 1
  • 12
  • 29
19
votes
1 answer

Is it possible to run multiple binaries from a single module via npx?

(Note: I'm using the cowsay module here to illustrate my point) Without installing a module on my computer I can run it directly via npx with: npx cowsay Hello! If I have multiple binaries specified in package.json. "bin": { "cowsay":…
dgwyer
  • 739
  • 8
  • 19
16
votes
2 answers

npx: the shell-auto-fallback argument has been removed

I honestly don't remember what I last installed on my machine, I believe it was brewing gatsby-cli. Anyway, since yesterday morning my terminal has been giving me the following error when I open a new instance or reset the terminal (open a new tab,…
Mike Earley
  • 1,223
  • 4
  • 20
  • 47
16
votes
2 answers

Run NPX commands in debug mode

I got some npx create-react-app command stuck without showing any error on the terminal. So, I require to run npx in debug mode. Is there a way to get a debug log for npx commands to identify the issue? edit: the command I ran: npx create-react-app…
Nilanka Manoj
  • 3,527
  • 4
  • 17
  • 48
15
votes
3 answers

"TypeError: minimatch is not a function" error when running new expo project

I have the following libraries installed on my M1 Macbook running Ventura 13.3.1: $ nvm -v 0.39.3 $ node -v v18.16.0 $ npm -v 9.6.4 $ npx expo -v 0.7.0 I generated a new expo project using the command: npx create-expo-app my-app --template I…
pjb3
  • 5,191
  • 5
  • 25
  • 44
15
votes
1 answer

How to run npx with something similar to `--registry https://registry.npmjs.org` when running npm install to get around artifactory?

--registry https://registry.npmjs.org is been used to get around artifactory alike proxy when install with npm install But I want to do similiar thing with npm xxx because I encounter npm ERR! code E401 npm ERR! Unable to authenticate, need: Basic…
ey dee ey em
  • 7,991
  • 14
  • 65
  • 121
14
votes
1 answer

Can I use NPX with yarn?

I have a project that I am using yarn for. I've installed all my packages using yarn, I run yarn dev and so on. Now I'm following a tutorial that requires me to use npx to set up a package. - I'm wondering if I can just go ahead with this or if I…
antonwilhelm
  • 5,768
  • 4
  • 19
  • 45
13
votes
1 answer

Error: Illegal characters in path in npm rimraf

I am getting an error while I tried to delete multiple directories using npm rimraf. Error: Illegal characters in path Command I run is rimraf **/lib/** > ecommerce.ui@0.7.2 clean-libs > rimraf **/lib/** Error: Illegal characters in path. at…
Sanke
  • 676
  • 2
  • 13
  • 30
13
votes
1 answer

What is difference between pnpm create, pnpx, dlx?

The pnpm package manager offers three commands that are alternatives for npm's npx command. These are pnpm create, pnpx and pnpm dlx. All three seem to do the same thing. But what are the differences between them? Which one should be preferred for…
Arctomachine
  • 401
  • 6
  • 12
13
votes
7 answers

How do you fix npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead

How do you fix this problem? Nodejs npm and npx problem When i trying to install or check anything on command prompt. Node js through npm WARN config global --global, --local are deprecated. Use --location=global instead this error. For instance…
Backend Rule
  • 141
  • 1
  • 1
  • 6
12
votes
1 answer

How do I use --node-arg in npx / npm version 7?

npx used to have a --node-arg option to specify options for node. In npm v7, this results in: npx: the --n argument has been removed. See `npm help exec` for more information Which states: The --node-arg and -n options are removed. Without any…
mikemaccana
  • 110,530
  • 99
  • 389
  • 494
1
2
3
53 54