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
3
votes
0 answers

Using max-old-space-size in NPX

I was updating the scripts in package.json which uses the "./node_modules" to use NPX commands and came across ng build with "max-old-space-size" argument. I have converted the command as following from node --max-old-space-size=10240…
ezcoth
  • 31
  • 3
3
votes
2 answers

Errors with create-react-app my-app redux with new react 18.0.0

I am trying to create a react app with redux with the general command of npx and I am getting this error command npx create-react-app myp --template redux error Installing template dependencies using npm... npm ERR! code ERESOLVE npm ERR! ERESOLVE…
3
votes
1 answer

Next.js create-next-app won't work anymore

I have been able to get around and make Next.js apps a lot as of late. However, something changed and I cannot seem to find a solution to my issue. I run npx create-next-app and it hits me with an error and only creates the package.json.…
3
votes
1 answer

npm binary using ts-node causes errors when invoked using npm i -g or npx

I have a module which exposes a bin in package.json which points to a TypeScript file. The .ts file has a ts-node shebang and is executable and works well. However, when trying to use this binary from another package, I get errors: Using npm i -g…
JHH
  • 8,567
  • 8
  • 47
  • 91
3
votes
2 answers

sh: hardhat: command not found when installing Hardhat

Trying to build a project with Hardhat, I have node v15.14.0, and ran the following commands: npm init -y npm install --save-dev hardhat Terminal gives me: Then I ran: npx hardhat But got an error saying: sh: hardhat: command not found
Grooby
  • 31
  • 1
  • 4
3
votes
2 answers

Issue when trying to start parcel development server

I am trying to use parcel for the first time. I installed it to my project using the npm install parcel command. Then I tried to start the development server by running the command npx parcel src/index.html and nothing happens. I do not get an…
3
votes
1 answer

`npm ERR! code 1` after SyntaxError when running `npm ci && npm run build`

I am trying to build and run a project on an npx dev-server. My package.json file has "type":"module" inside the first {} as recommended here. When I run npm ci && npm run build in terminal (MacOS Mojave), I get the following error message: [!]…
WhooNo
  • 911
  • 2
  • 12
  • 28
3
votes
1 answer

npx create-react-app running with old version

The latest version create-react-app is 4.0.3 but when I run npx create-react-app my-app it uses version 1.5.2 and also doesn't run with templates. I don't have any global installation of it and have tried uninstalling it using npm uninstall -g…
SuPythony
  • 875
  • 8
  • 23
3
votes
1 answer

Nodejs child_process spawn option arguments with dashes("--")

I'm trying to run a child_process spawn with arguments that includes "--", but it doesn't seems to register that for a reason. The command I'm trying to spawn is: wp-env run tests-cli "wp plugin update --all" (This is a cli package to run a…
3
votes
1 answer

What is the point of NPX using cache?

So I read that using NPX would be good because, among other things, it would allow me to run packages with no need of installing them. One of the advantages I would get immediately would be more free space on disk. However, when I run something…
Rodrigo
  • 31
  • 2
3
votes
0 answers

npx react-native run-android --variant=release fails but succeeds with ./gradlew bundleRelease?

this is my error message which i don't know what to look for: info Writing bundle output to:, /Users/glendonphilippbaculio/Desktop/rnAnimated2/android/app/build/generated/assets/react/release/index.android.bundle info Writing sourcemap output to:,…
gpbaculio
  • 5,693
  • 13
  • 60
  • 102
3
votes
3 answers

Moderate severity vulnerabilities found after running npx create-react-app

I have installed the latest LTS Version: 14.17.0 (includes npm 6.14.13) of 32-bit on Windows. After the node installation, I've installed create-react-app module globally using npm i create-react-app -g I've installed both of them successfully…
3
votes
0 answers

How does npx decide which package to install (original: Cannot find module '..../clean' while installing coc-python)

(I'm starting with a lot of background, which is not directly relevant for the questions (but do explain where I'm coming from), but it may be very helpful for others having a similar problem (to actually recognise that they're having this problem)…
Claude
  • 8,806
  • 4
  • 41
  • 56
3
votes
3 answers

“npx create-react-app appname” not working

When I run npx create-react-app appname I get the following error message: You are running `create-react-app` 4.0.0, which is behind the latest release (4.0.1). We no longer support global installation of Create React App. Please remove any global…
breaktop
  • 1,899
  • 4
  • 37
  • 58
3
votes
1 answer

npm ERR! cb.apply is not a function in NPM Nodist

Environment: 1 - Windows 10 2 - Nodist 3 - Node : v14.8.0 4 - npm: 6.9.0 Trying to install npx globally or create react app using npm. npm install -g npx npm WARN npm npm does not support Node.js v14.8.0 npm WARN npm You should probably upgrade to a…
Inzmam ul Hassan
  • 215
  • 4
  • 16