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
2
votes
1 answer

Can't solve this error in next.js Deploying on Netlify. Imported Image and tag throwing the error

I have tried to remove the code in the index.js line:4 and line:15 then deployed on netlify (Working properly but image not coded but I want the image). Now, when I try to do like the code below. It is getting me this error. I just only put line:4…
2
votes
1 answer

Is there a way to get npm install to install "bin" executables in the local node_modules directory (the .bin directory)?

I have a Node project, and I can npm pack it into a tarball and install it in another directory for testing. When I do that, the set of files in the "bin" clause of my package.json are correctly symlinked into the node_modules/.bin directory there.…
Pointy
  • 405,095
  • 59
  • 585
  • 614
2
votes
2 answers

Why do ReactDOMServer and ReactDOM give the "root.hydrate is not a function" error

When creating an app using create-react-app I get the following error when trying to use hydrate instead of the default .render. Here is the src/index.js file's contents. import React from 'react'; import ReactDOMServer from…
tpmccallum
  • 41
  • 3
2
votes
1 answer

Use aws sso to execute sls commands

I am running below command to list all the CloudFormation stack outputs. npx sls info --stage $STAGE --verbose Upon executing I am getting below error ProcessCredentialsProviderFailure: Profile default not found I can definitely use aws access…
monofal
  • 1,928
  • 1
  • 13
  • 15
2
votes
1 answer

unable to download playwright by the command npx playwright install

Operating System: Windows Node.js version: v16.14.2 I cannot install playwright through the command 'npx playwright install'. When I typed 'npx playwright install', it started to download browsers, but when it reached 99% it stuck there (like in the…
marcArisen
  • 21
  • 1
  • 3
2
votes
1 answer

How to run locally installed npm package with npx

I have the following folder structure with the locally installed Cypress module: cypress-test-project node_modules cypress tests.spec.js As I read it in this article, npx helps to execute globally and locally installed packages: Run a…
Nestor
  • 8,194
  • 7
  • 77
  • 156
2
votes
1 answer

vscode wont run nvm packages without me rerunning the .zsh_profile command everytime i restart vscode

I know a lot of other people have had this issue but i cant seem to make it work. if i dont run these commands in the vscode terminal everytime i open it it wont run npx,npm or nvm. export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \.…
PsOom
  • 37
  • 7
2
votes
1 answer

How to enable nodejs profiler for a typecript app?

I am trying to profile an typescript app running on nodejs however, i don't seem to find the way to enable nodejs' profiling . npx --prof ts-node myapp.ts wont' work. Doing it via environment variables like export NODE_OPTIONS=--prof npx ts-node…
T. Francis
  • 169
  • 1
  • 12
2
votes
0 answers

(node:8472) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE]

so i got error when i started my react-app (node:8472) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option. (Use `node --trace-deprecation…
2
votes
2 answers

How to install Laravel Vite?

The Laravel Vite Doc sais to run: npx apply laravel:vite --ignore-existing inside your project root to install vite in your laravel project. When I try to do that in a freshly installed laravel project it shows this: zsh:1: command not found:…
Artur Müller Romanov
  • 4,417
  • 10
  • 73
  • 132
2
votes
1 answer

How To Kill an Open Port Running In React Native (Expo) in Windows

The situation here is that we have initiated a server in React Native using npm start, expo start or other methods and later killed the server using CTRL + C but when you run npm start again you see that the particular port is already being used and…
AnatuGreen
  • 579
  • 7
  • 14
2
votes
2 answers

Timeout trying to fetch resolutions from npx-force-resolutions

I am trying to force resolve certain dependencies using below command npx npm-force-resolutions After every attempt it throws a timeout error and breaks out. Stacktrace: Error: Timeout trying to fetch resolutions from npm at switch__2144__auto__…
Humble Bee
  • 1,130
  • 2
  • 12
  • 19
2
votes
2 answers

Task :app:mergeDebugAssets FAILED when I try to run npx react-native run-android

I'm working on an android app on react-native using vscode and a physical android device and it keeps showing the error below while trying to build using npx react-native run-android. Task :app:mergeDebugAssets FAILED Deprecated Gradle features…
2
votes
0 answers

React Start Script Does Not Open in Firefox

When I start a new react app using npx create-react-app some-app and then adjust the start script to "start": "BROWSER='Firefox Developer Edition' react-scripts start", it still opens up with chrome when I run with npm start. What am I…
brunshte
  • 153
  • 2
  • 9
2
votes
0 answers

(GitHub Actions, Cypress run fails to record outputs): `Error: EACCES: permission denied, mkdir '/__w/**`

I'm trying to execute a cypress run job on GitHub Actions and I encounter the following issue: Warning: We failed to record the video. This error will not alter the exit code. Error: EACCES: permission denied, mkdir…
Guy NANA
  • 61
  • 6