Node_modules dir doesn't get cached or restored without error in workflow

cache

#1

I’m running into a cache problem. I million-checked but can’t figure out if I’m doing something wrong:

  • I have a workflow that runs npm install in a job and saving node_modules in the cache.
  • In the following job, I am restoring the cache and running one of my npm script, which fails because the command is not found.
  • I SSHed into the build and found out that the node_modules directory didn’t exist, even though it said it was restored.
  • Weird fact: it says its size is 32B which is very unlikely considering the dependencies I have.
  • Other weird fact: I am restoring 2 keys at a time, but it looks like this is not working properly as only one gets restored (randomly apparently)

I don’t know if the problem comes from the saving step or the restoring step as I don’t believe it’s possible to hack into the caching process.

My dependencies job (successful): https://circleci.com/gh/OzTK/elm-express-boilerplate/62
My build job (fails): [same base url with 63 at the end]
My test job (fails): [same base url with 64 at the end]


#2

My bad… Just a typo: node-modules -> node_modules :scream:


#3

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.