Skip to content
This repository has been archived by the owner on Apr 7, 2021. It is now read-only.

[BUG] npx installs the lib upon each execution from scratch, instead of using cache #85

Open
LiranBri opened this issue Nov 19, 2020 · 3 comments

Comments

@LiranBri
Copy link

What / Why

npx installs the lib for every executions every time, instead of using cache.
I get the following output:
npx: installed 92 in 40.544s

I would expect it to happen only upon the first time, and on following executions to be served from cache very fast.

When

Every time I execute the command via npx

Where

Private NPM repository

Current Behavior

Every time I execute a command it re-installs from scratch

Expected Behavior

To load the lib from cache, similar to what would have happened if it was installed globally

@LiranBri LiranBri changed the title [BUG] npx installs the lib for every executions every time, instead of using cache [BUG] npx installs the lib upon each execution from scratch, instead of using cache Nov 19, 2020
@ljharb
Copy link

ljharb commented Nov 19, 2020

I believe it does use the cache for the downloaded tarball, it just unpacks the tarball every time to ensure a fresh copy.

@LiranBri
Copy link
Author

@ljharb if its just CPU thing, it makes sense to take 40 seconds?

@ljharb
Copy link

ljharb commented Nov 19, 2020

that is a good point :-)

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