Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

-p attempts to re-install the package #214

Open
natlibfi-arlehiko opened this issue Dec 3, 2018 · 2 comments
Open

-p attempts to re-install the package #214

natlibfi-arlehiko opened this issue Dec 3, 2018 · 2 comments

Comments

@natlibfi-arlehiko
Copy link

Problem

Running npx with the parameter -p executes npm even though the package is already installed. Adding --no-install doesn't help either. This makes using npx as opposed to node_modules/.bin/<some-command> much slower.

Reproduction

$ npm install istanbul babel-cli
npm WARN npm@1.0.0 No description
npm WARN npm@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ babel-cli@6.26.0
+ istanbul@0.4.5
added 4 packages from 33 contributors, removed 8 packages, updated 7 packages and audited 1589 packages in 2.892s
found 0 vulnerabilities

$ npx istanbul
Need a command to run
Try "istanbul help" for usage
$ npx --no-install -p babel-cli babel-node
npx: installed 237 in 3.512s
> 
@natlibfi-arlehiko
Copy link
Author

Still occurs.

@silverwind
Copy link

Also seeing this with zopflipng-bin which installs the binary zopflipng. Because the package name differs from the binary name, I'm forced to use -p which seemingly makes npx ignore node_modules/.bin and in turn reinstalls the module on every execution. Example:

npx -p zopflipng-bin zopflipng

If node_modules/.bin/zopflipng exists, npx zopflipng works, but I can't use it because I specifically need thezopflipng-bin module.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants