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

How do I update path npx version?

When I run npx --version, it returns me v6.x.x But after I do npm install -g npx, yarn global add npx, and it shows successful download of npx v10, running npx --version still returns me v6.x.x Running where npx gives me: C:\Program…
Samson
  • 1,336
  • 2
  • 13
  • 28
8
votes
1 answer

How to delete the localy installed version of npx command?

When I execute a command with npx, npx propose me to install a version locally. Example npx matcha-stock -s=MSFT If the version is updated on npm.org, npx gives me only the version installed locally and doesn't check if an updated version…
Raphael Mansuy
  • 213
  • 1
  • 4
  • 10
8
votes
2 answers

npx create-react-app fails while executing yarnpkg on big sur

I've found a few posts on this already but none of the existing solutions seem to work. OSX Big Sur yarn 1.22.10 npm 7.0.11 I updated xcode developer tools. I deleted npm cache I removed .npm and .yarnrc folders And then trying to start a new…
Gregg
  • 34,973
  • 19
  • 109
  • 214
7
votes
1 answer

Creating a Next.js app in VS Code does not have 'Pages' or 'Styles' folder

When creating a Next.js app in VS Code, I run the following command: 'npx create-next-app@latest' and go through the process of creating the app. However, Next.js's website shows that I should have a 'pages' and 'styles' folder along with the 'app'…
zachrm25
  • 73
  • 1
  • 3
7
votes
7 answers

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. npm ERR! Unexpected token '.'

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. npm ERR! Unexpected token '.' Everything was working well in my machine. but suddenly npm/npx started throwing the above error. I'm getting the same error…
basith
  • 740
  • 4
  • 13
  • 26
7
votes
2 answers

npx create-react-app client gives this error "Cannot read properties of undefined (reading 'isServer')"

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template... npm ERR! Cannot read properties of undefined (reading 'isServer') npm ERR! Cannot read properties of undefined (reading…
Priyesh Ranjan
  • 111
  • 1
  • 3
7
votes
3 answers

npx create-react-app myapp error "\AppData\Roaming\npm-cache\_npx\19748" does not contain a package.json file in appdata folder

OS: Windows for creating react app using npx i've write the following command: npx create-react-app myapp it shows this error: npm ERR! Could not install from "myusername\AppData\Roaming\npm-cache\_npx\19748" as it does not contain a package.json…
Sarthak Bhagwat
  • 634
  • 1
  • 5
  • 13
7
votes
4 answers

npx create-react-app not working "Must use import to load ES Module:"

I've tried reinstalling node and removing appdata/roaming/npm and npm-cache. I've created several apps before so i'm not sure what's going on. Any help is appreciated.
Robert Danielsson
  • 347
  • 1
  • 2
  • 11
7
votes
5 answers

Cannot run program "npx": error=2, No such file or directory when running React Native app

I have been working with react-native project in another pc and it has been working correctly. Now I cloned project to another device where I have react-native installed since I work with other project and I cannot run it. When I run react-native…
Edison Biba
  • 4,384
  • 3
  • 17
  • 33
7
votes
5 answers

npx react-native init error does not contain a package.json file in appdata folder

when I use regular npm or npx commands like npm -version or npx -version there is no error, but for my react native project when I use npx react-native init testApp it shows this error: does not contain a package.json file in appdata folder How…
aygin
  • 109
  • 1
  • 7
7
votes
2 answers

Argument of type [type] is not assignable to parameter of type [type]

I got this error when I run npx webpack Version: webpack 3.12.0 Time: 57478ms Asset Size Chunks Chunk Names app.js 172 kB 0 [emitted] app vendor.js 7.91 MB 1 [emitted] [big] …
Sithu
  • 4,752
  • 9
  • 64
  • 110
6
votes
0 answers

unable to install React-native: Error msg warn Package expo contains invalid configuration: "dependency.platforms.ios.podspecPath"

I am attempting to re-install development environment after it became corrupted. I am using Windows 10 Attempting to use npx react-native get the following error: warn Package expo contains invalid configuration:…
6
votes
2 answers

unexpected end of json input error when I try to create a react app

I keep getting the error of unexpected end of json input when I run the command "npx create-react app". below is the error message: error An unexpected error occurred:…
Josh
  • 93
  • 1
  • 6
6
votes
4 answers

Failed to create nx workspace

I am new in NX, and even new in NodeJS ecosystem. As I found interesting tool to scaffold full-stack application development, where is NX, then I gave a try. But I always failed in the first step in creating nx-workspace. Right not, I am using Node…
Hary Wahyudi
  • 61
  • 1
  • 1
  • 2
6
votes
3 answers

Getting an error during the dependency installation of Strapi installation process

recently I tried to install Strapi to my windows computer using "npx". But I'm getting an error when the dependencies get updated as below.I tried to uninstall and install knex but it didn't work. How can i solve tthis problem? strapi-app>npx…