is there a way to cache the pulumi plugins? it see...
# general
b
is there a way to cache the pulumi plugins? it seems npm is wiping out the cache from my CI:
Copy code
npm ci
npm WARN prepare removing existing node_modules/ before installation
l
Which CI is this? I would rather find out why it behaves like this? Which version of npm are you using?
f
So npm ci always removes all node_modules to make sure the modules only adheres to the package.json file.
l
@bitter-dentist-28132 is the package.json created on an OS different from the CI runner? If so, it looks like this: https://github.com/npm/cli/issues/558#issuecomment-569931551
b
you're talking about the
package-lock.json
not the
package.json
right?
l
Yep, my bad.
b
it looks like @fast-dinner-32080 is correct re: cleaning the `node_modules`:
If a 
node_modules
 is already present, it will be automatically removed before 
npm ci
 begins its install.
https://docs.npmjs.com/cli/ci.html
should i be using
npm install
in ci instead of
npm ci
then? that seems strange.
i'd ideally like some caching for CI
l
Hmm.. I thought that was what
npm ci
was all about: read the lock file, and update the
node_modules
only when there are differences.
because
npm install
(without arguments) does not adhere the lock file in all circumstances.
b
yeah... very weird that it blows away
node_modules