Closed iamlinkus closed 3 weeks ago
Scam comment above ^
Can you retry with Next canary 104?
Also, do you have "type": "module"
in your package.json?
Can you retry with Next canary 107?
Also, do you have
"type": "module"
in your package.json?
On any version before 91 (and all latest next canaries) everything worked perfectly. Is there a specific reason you want me to try downgrading next? It works when I downgrade payload to 90, and leave next at 130.
Regarding the "type": "module"
- no, I don't have that. The create payload app source doesn't either.
Until Beta concludes I would recommend sticking to exactly the package versions that Payload's examples specifies: https://github.com/payloadcms/payload-3.0-demo/blob/main/package.json as Next canaries can easily break Payload.
Until Beta concludes I would recommend sticking to exactly the package versions that Payload's examples specifies: https://github.com/payloadcms/payload-3.0-demo/blob/main/package.json as Next canaries can easily break Payload.
I think it's fair to assume that next is not at fault here, since it worked and still works with all the ~2 weeks worth of canaries and the only difference between working and not working is payload version 91 vs 90. I've got at least 4 projects currently in production with canaries higher than the example and closer to the current ones with no issues whatsoever. But this is beside the point, you're commenting on a bug report for a specific case for the latest beta, I don't think "sticking to old versions" to "solve" an issue on a OSS project is helpful, @tyteen4a03, don't you think?
I guess I should reword it as Payload can be easily broken by newer Next canaries
, which is just an unfortunate fact working with Betas.
There's nothing wrong with the issue, just suggesting sticking to the current versions in case you wanted the problem to go away for you quickly :)
Thanks, @tyteen4a03 , I'm fully aware of the dangers of working with beta/canary software :) As I mentioned in the issue, reverting back to payload beta v90 is how I made the problem go away quickly and will stick to that until this issue resolved.
Just checked, version 95 still has the same problem
I'm having the same issue with Node v22.7.0 PayloadCMS v3.0.0-beta.96 and NextJS v15.0.0-canary.134.
Also I'm using next.config.ts
instead of next.config.js
.
I solved it by going back to next.config.js
.
But I think using TypeScript for the next.config file is a good feature (on NextJS side) and should be supported by PayloadCMS!
Try to use .mts
extension instead of .ts
Replacing it with .mts
extension, I get this:
○ Compiling / ...
⚠ ./node_modules/.pnpm/mongodb@4.17.1_@aws-sdk+client-sso-oidc@3.637.0/node_modules/mongodb/lib/bson.js
Module not found: Can't resolve 'bson-ext' in '/000-2024/node_modules/.pnpm/mongodb@4.17.1_@aws-sdk+client-sso-oidc@3.637.0/node_modules/mongodb/lib'
Import trace for requested module:
./node_modules/.pnpm/mongodb@4.17.1_@aws-sdk+client-sso-oidc@3.637.0/node_modules/mongodb/lib/bson.js
./node_modules/.pnpm/mongodb@4.17.1_@aws-sdk+client-sso-oidc@3.637.0/node_modules/mongodb/lib/index.js
./node_modules/.pnpm/mongoose@6.12.3_@aws-sdk+client-sso-oidc@3.637.0/node_modules/mongoose/lib/index.js
./node_modules/.pnpm/mongoose@6.12.3_@aws-sdk+client-sso-oidc@3.637.0/node_modules/mongoose/index.js
./node_modules/.pnpm/@payloadcms+db-mongodb@3.0.0-beta.97_@aws-sdk+client-sso-oidc@3.637.0_payload@3.0.0-beta.97/node_modules/@payloadcms/db-mongodb/dist/index.js
./src/payload/payload.config.ts
./src/payload/utilities/getPayload.ts
./src/actions/forms.ts
This should be fixed with https://github.com/payloadcms/payload/pull/8521 (included in beta.111)
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.
Link to reproduction
No response
Payload Version
Beta 91
Node Version
21.4.0
Next.js Version
Canary 130
Describe the Bug
After updating from payload beta 90 to 91 without any other changes, when running dev it throws this:
Reproduction Steps
pnpm create payload-app@beta
next.config.js
tonext.config.ts
.pnpm devsafe
Reverting to beta 90 and leaving everything else the same fixes the issue.
Adapters and Plugins
No response