After a restructuring in my monorepo it seems my project uses stale cache on build and fails.
How do people clear their cache on Payload Cloud??
I've had to rollback some things and it seems my Payload Cache is stale again - will someone please cache clear Cloud for me? Thank you 🙏
ProjectId: 65ab7dfd9cd1b4cda482f61c
Let me know how I can do it as part of my build script if possible
I think you sorted this last time 🙏
Hey
@735059082293149777are you able to build locally? I am in your project now and it looks like all recent builds have failed
Yep it builds fine locally
Ok, can you check your settings on the Payload app in your repo? I am guessing you have it set to only provide access to the repo in question, but as I've just discovered I think there is a bug with our auth, to where if it is not set to all repos, our platform doesn't have permissions to trigger a redeploy
Yes I have it set to only select
Would you be able to set that to All for the purpose of this fix? Realistically—we (Payload cloud admin platform) cannot/would not interact with any other repos. This also only applies to repos that your personal github user account owns. If not, I am waiting for Elliot from our side to get back online in a few hours.
And I'm betting this is related to the cache issue, because all the builds on our platform failed, likely due to it not having permissions for your repo
Sorry I couldn't get back to you sooner - I did set it to "All" before and redeployed twice with the same result (fail) and didn't get the chance to notify of that here
Still fails
Ok—no worries! You can disregard this, as I was informed that the place I was attempting a redeploy only works if it's within a certain time period of when you deployed the project initially
I am actually looking through the deploy logs now—it looks like the last successful deployment was 9/9—on 9/12, build failed, and never built successfully after that.
That sounds about right
So I'm working on and off on backend (payload) and frontends in a monorepo (the payload build only runs whenever I merge to its dedicated branch).
Recently I've made changes to the project (switch to bun as package manager and script runner, migrate to ESM) which I'd had to rollback.
Currently the build succeeds locally, plus stale cache in Payload Cloud seems to have been an issue in the past when I've made changes to the project setup itself.
Can you do me a solid and clear the cache on my project? Pretty sure that's why my build is failing: ProjectId 65ab7dfd9cd1b4cda482f61c
This doesn't appear to have anything to do with the cache
Cleared the cache and re-attempted deploy, still same error on build
[2024-09-22T15:20:57]
│ Running custom build command: yarn payload:build
[2024-09-22T15:21:04]
│ src/payload-cms/fields/_sidebar/tenant/index.ts(1,30): error TS2307: Cannot find module 'core/utilities/isSuperadmin' or its corresponding type declarations.
[2024-09-22T15:21:04]
│ src/payload-cms/collections/Availabilities/index.ts(1,35): error TS2307: Cannot find module 'core/access/tenantSuperadmins' or its corresponding type declarations.The build fails because three modules were renamed. No amount of reinstalling, changing settings and redeploying makes Cloud discover that these files were renamed. Thx for the cache clear, do you think there could be other caches at play?
I don't see how caching would have anything to do with this. Do you have a tsconfig path alias for
corethat needs to be adjusted? What rename did you do in your codebase?
I thought it was a hangup with the aliases at first, but the same aliases work for all other files than the three that were renamed, pretty sure the renames is the hangup
Locally builds fine
Is this a monorepo or something? Can you show your tsconfig.json that has
corein it?
We've done all we can do on our end as far as cache clearing goes. It likely resides in your code.
Yes it's a monorepo
{
"compilerOptions": {
"target": "ESNext",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"declaration": true,
"declarationMap": true,
"composite": true,
"downlevelIteration": true,
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"rootDir": ".",
"outDir": "dist",
"jsx": "react-jsx",
"sourceMap": true,
"resolveJsonModule": true,
"baseUrl": ".",
"paths": {
"internal/*": ["./src/interface/*"],
"core/*": ["./src/payload-cms/*"],
"vipps/*": ["src/plugins/vipps/*"],
"@vippsmobilepay/sdk/script/types": ["../../node_modules/@vippsmobilepay/sdk/script/types.d.ts"] // https://github.com/vippsas/deno-sdk/issues/61
}
},
"references": [
{ "path": "../interface" }
],
"include": [
"src/**/*",
"babel.config.js",
".eslintrc.js"
],
"exclude": [
"dist",
"build",
"node_modules"
],
"ts-node": {
"transpileOnly": true
}
}Never had an issue with these aliases
As mentioned they work, just not for those three renamed files
@1103357985847267442
Turns out if you don't set
git config core.ignorecase falsegit doesn't notice case changes in filenames.
TYSM for your help and sorry for my lack of faith!!
Awesome!
Star
Discord
online
Get dedicated engineering support directly from the Payload team.