unfold / heroku-buildpack-pnpm

Run PNPM install on Heroku

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node_modules not caching when deploying on dokku

rohanrajpal opened this issue · comments

Describe the bug
Hey, I'm using dokku to deploy my nestjs app. It seems that my node modules are never cached, can anyone help me figure out why?

I see that it says pnpm (nothing to cache) and dont understand why isnt there anything to cache?

Here's the log:
https://gist.github.com/rohanrajpal/bc7cc3b14b3f7f3866826b0aea84f004

To Reproduce
Steps to reproduce the behavior:

  1. Setup dokku.com on any ec2 instance
  2. Deploy a nestjs app setup with pnpm
  3. Node modules are never cached

Versions (please complete the following information):

  • Heroku Stack: gliderlabs/herokuish:latest-22
  • Node Version: 18.12.1
  • NPM or Yarn Version: pnpm - 7.16.1

Additional context
The build log shared above has a lot more details

My best guess is that the path of caching is set incorrectly? Happy to make a PR if someone can point me in the right direction to fix this

On a little bit of investigation, I see that we are skipping the caching part after the build?

https://github.com/unfold/heroku-buildpack-pnpm/blob/main/bin/compile#L346

Is it because pnpm does this automatically somehow?

Alright, so the cache is indeed set. So am I right in assuming that caching is happening properly in this buildpack.

https://github.com/unfold/heroku-buildpack-pnpm/blob/main/bin/compile#L227

Node modules are installedin 38 seconds anyway, I guess that's good enough?

Yea, the text is wrong. Should be nothing extra to cache. It is handled by the default cache.