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

How to define Commitizen adapter when using "npx git-cz"?

I am trying to adopt a conventional commits like standard to my projects. While searching for linters and other automation tools I stumbled upon commitizen. I want to use it in my project without installing it locally neither globally using the NPX…
5
votes
4 answers

npx cannot find module 'webpack'

I'm trying to test a custom Webpack configuration. I've read that instead of typing node ./node_modules/webpack/bin/webpack.js, I can use npx webpack. But I can't seem to get it to work. user@comp:~/raw> npx webpack The CLI moved into a separate…
Lizi
  • 69
  • 1
  • 3
4
votes
1 answer

Visual Studio 2022: Cannot create a project named "tempProjectCreation" because of npm naming restrictions

I'm trying to create a new Typescript project in Visual Studio 2022 Community Edition. I've installed Visual Studio 2022 Community Edition (Windows), as well as Node.JS v18.12.1-x64 for Windows. In the Visual Studio Installer (v17.4.2) I clicked the…
seancon
  • 63
  • 1
  • 8
4
votes
1 answer

NPX command not running in Azure pipeline

I need your help I was trying to run my cypress test cases which I generally run using command "npx cypress run" so I tried to have the same command in tasks when I created Azure pipeline after NPM Install I even tried installing npx via npm task…
ksk
  • 165
  • 14
4
votes
1 answer

Can't commit using husky: .husky/pre-commit: line 4: npx: command not found

I have installed husky and it was working fine for months and then out of the blue today after a restart this error came up: husky - command not found in…
mishchief
  • 412
  • 3
  • 13
4
votes
4 answers

ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC - can't install node packages either via npm or yarn

Can't install node packages via npm or yarn This has been happening to me since last month and I have tried multiple solutions from the internet including stack overflow solutions like https://stackoverflow.com/a/34945326/15488503 The problem is…
4
votes
1 answer

Error: EPERM: operation not permitted, scandir

please I am running a react native project but when I run the npx react-native run-android command, I get the error below error EPERM: operation not permitted, scandir 'C:/Users/REO/AppData/Local/Application Data'. Error: EPERM: operation not…
Reo
  • 91
  • 1
  • 7
4
votes
0 answers

Can ES6 file be used with custom npx command

Created a project with custom npx command "bin": {"myCommand": "./bin/myJsFile.js"} js file is in ES6 and use the import statement to import a file say importFile written in ES6. I deploy the command locally using npm i -g when I try to run it…
4
votes
1 answer

React-native: Build failed CompileC (in target 'ExpoModulesCore' from project 'Pods')

Whilst trying to build a react-native app to run in ios sim the following error occurs: The following build commands failed: CompileC…
4
votes
0 answers

What does the npx command install?

This question is about understanding how the npx command works and what it exactly does under the hood. (The documentation does not really help - see below) From the documentation: Installation-less command execution There is another great feature…
Alexander Mihailov
  • 1,050
  • 1
  • 12
  • 19
4
votes
1 answer

React Native Error: Cannot find module metro/src/shared/output/bundle

command npx react-native init gonative I ran this command in root terminal (parrot linux) and encountered with error. It says cannot find module 'metro/src/shared/output/bundle' Node version : v17.3.0 npm version: 8.3.0 npx version :…
RoyalBosS
  • 350
  • 3
  • 13
4
votes
4 answers

Error: Command failed: yarn add react-native@latest - React Native

I've been trying to start a new React Native project but have been facing this issue for a few days, tried searching for it on a lot of forums but couldn't find any solution that works for me. The commands I've tried: npx react-native init…
Amin
  • 41
  • 1
  • 3
4
votes
2 answers

Does running an npm package with npx cause devDependencies to get installed?

I'm finding it difficult to get a clear answer to this on the web. When you run a command in a package with npx (eg, npx mypackage sayhello), are the devDependencies within that package installed? I'm guessing yes, but not certain.
Steve Bennett
  • 114,604
  • 39
  • 168
  • 219
4
votes
2 answers

VSC Apex-prettier-plugin-apex doesn't format - throws error

I use Visual Studio Code and have installed Prettier plugin as well as Prettier-plugin-apex according to https://developer.salesforce.com/tools/vscode/en/user-guide/prettier (also…
Irene
  • 181
  • 1
  • 4
4
votes
4 answers

could not create react project

I was trying to create a react project using the command npx create-react-app chat-app But I am getting this error. Creating a new React app in /home/mikhil/react-tutorial/internshala-react-course/chat-app. Installing packages. This might take a…
MikhilMC
  • 949
  • 3
  • 8
  • 14