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
6
votes
2 answers

spawn C:\Windows\system32\cmd.exe;C:\Program Files\Git\bin ENOENT

hope all is well. I am trying to run the wizard from https://github.com/0xProject/0x-launch-kit. I have successfully downloaded Node.js, Yarn, Docker and npx but after running the following command npx @0x/launch-kit-wizard && docker-compose up I am…
Bemz
  • 129
  • 1
  • 16
6
votes
6 answers

create-react-app : npm ERR! Unexpected end of JSON input while parsing near '....'

Describe the bug npx create-react-app my-app doesn't work for me i tried npm cache clean --force but i get the same error again and again Steps to reproduce npm cache clean --force npm / npx create-react-app front npm init react-app front npx:…
Hakim Bencella
  • 187
  • 4
  • 12
6
votes
1 answer

npx babel not reading configuration from babel.config.js

When running npx babel index.js from the command line, I was hoping I would see my babel configurations being applied from babel.config.js However it does not seem the case as was wondering why this might be? // babel.config.js module.exports =…
Max Collier
  • 573
  • 8
  • 24
6
votes
1 answer

There was trouble creating the ESLint CLIEngine

There was trouble creating the ESLint CLIEngine. - 'basePath' should be an absolute path Trying to use eslint $ npx prettier-eslint **/*.js but getting: prettier-eslint [ERROR]: There was trouble creating the ESLint CLIEngine. prettier-eslint-cli…
Michael Durrant
  • 93,410
  • 97
  • 333
  • 497
6
votes
2 answers

running npx update with error cannot find set-blocking

I tried using "npx update". I am at a total loss why i am getting this error and cannot seem to find even a starting point on this. The only thing I am using npx for is capacitor (with ionic framework). Any help on the reason for this or fixes or…
sasy solutions
  • 179
  • 1
  • 9
6
votes
1 answer

Using NPX command for shell script shebang / interpreter

I'd like to run a command line script using the coffee executable, but I'd like to call that executable through npx. Something like #!/usr/bin/env npx coffee does not work, because only one argument is supported via env. So, is there a way to run an…
surj
  • 4,706
  • 2
  • 25
  • 34
6
votes
4 answers

npx webpack insists on installing webpack-cli but its already installed

I am attempting to run the command: npx webpack It tells me it needs webpack-cli and asks if it should install it, I say 'yes'. Then it gives me: PS C:\_ljdev\webpack demo> npx webpack npx: installed 321 in 11.89s One CLI for webpack must be…
JTech
  • 3,420
  • 7
  • 44
  • 51
5
votes
4 answers

npx react-native link dose not working for me

I'm trying to use this (https://mehrankhandev.medium.com/ultimate-guide-to-use-custom-fonts-in-react-native-77fcdf859cf4) to add font but I have problem with this part... npx react-native link this command don't shows anything to me... anything;…
amir
  • 53
  • 1
  • 1
  • 3
5
votes
2 answers

Can my NPM CLI package be executed on CMD without installing globally?

I have written an NPM package which has its own CLI commands. Let's name that package as xyz and imagine it's now avaialable on npmjs.com So, let's say a user installs this package in his project by running npm install xyz. And now he wants to run a…
Tharindu Thisarasinghe
  • 3,846
  • 8
  • 39
  • 70
5
votes
0 answers

how to display npx's executed binary path?

I have a yarn-workspace with different packages installed different versions of the same cli tool. assume it is called the-cli then whe I do npx the-cli, what option can I add to make npx print out the path for executed the-cli, so I know if it is…
Mars
  • 873
  • 1
  • 11
  • 24
5
votes
1 answer

npx but use version in package json

I have a build script in javascript project that uses parcel to iterate through folders and finding index files and then building those projects. When I find an index file I run this command: npx parcel build ${indexFilePath} --out-dir ${outDir}…
jokarl
  • 1,913
  • 2
  • 24
  • 52
5
votes
1 answer

React-native: Could not initialize class org.codehaus.groovy.reflection.ReflectionCache

I have did my React-native setup following instructions from https://reactnative.dev/docs/environment-setup Project has been created successfully. Android phone also connected using USB but when I try to install App on phone using command- npx…
jdk
  • 451
  • 1
  • 6
  • 18
5
votes
5 answers

Not able to create react app, wired error?

I am using the following cmnd to initialize a new react project: npx create-react-app test But I get this error : Invalid "exports" main target "index.js" defined in the package config…
Sam AlGhamian
  • 73
  • 2
  • 12
5
votes
1 answer

How to know which binary is chosen by npx

npx has a series search path , but when a command is chosen to run, I want to know exactly which binary was called. Is there some thing like which command for npx?
intijk
  • 547
  • 4
  • 12
5
votes
1 answer

"npx tsc --version" reports different TypeScript version inside virtual machine

I want to be able to run npx tsc on my project on both my host + guest operating systems. But the guest is using a different (older) version of tsc - and I'm not sure where it's coming from. My setup: Host OS: Windows 10 Guest OS: Debian 9 I'm…
LaVache
  • 2,372
  • 3
  • 24
  • 38