Turborepo Prisma Client cache issue
Reproduction repo for vercel/turbo#3393
Preconditions
- Node.js 18.13.0
- pnpm 7.25.0
- zstd
Repro steps
- Install dependencies with
pnpm i
- Generate Prisma Client with
pnpm turbo generate
- Check if Prisma Client files are generated with
ls -la node_modules/.pnpm/@prisma+client*/node_modules/.prisma/client/**
- Remove generated Prisma Client files with
rm -rf node_modules/.pnpm/@prisma+client*/node_modules/.prisma/client/
- Confirm that files were removed with
Expected result: Should return no matches found error
ls -la node_modules/.pnpm/@prisma+client*/node_modules/.prisma/client/**
- Once again generate Prisma Client with
Expected result: Should restore generated client from turbo cache
pnpm turbo generate
- Check if Prisma Client files were restored with
Result: Files were not restored
ls -la node_modules/.pnpm/@prisma+client*/node_modules/.prisma/client/**
- Check if Prisma Client files were cached with (hashin the fileanme may be different)
Result: Files are there but they were not restored
tar --use-compress-program=unzstd -ztvf node_modules/.cache/turbo/27dc189e81124d92.tar.zst