[BUG] npx installs the lib upon each execution from scratch, instead of using cache
LiranBri opened this issue · 3 comments
LiranBri commented
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
ljharb commented
I believe it does use the cache for the downloaded tarball, it just unpacks the tarball every time to ensure a fresh copy.
ljharb commented
that is a good point :-)