Closed bisand closed 1 year ago
Could you try downgrading auth.js to 0.9.0 ?
I have done some testing. Only downgrading auth.js to 0.9.0 does not make any difference. However, when I downgrade @hebilicious/authjs-nuxt to 0.1.10 it seems to be working OK. Pages can be served via Wrangler without problems.
The issue seems to be introduced in 0.2.0-beta.0, because when I upgrade to this version and all the versions later, I encounter the same problem described in this issue.
Hope this can lead you in the right direction. I can do some more research later, but this is what I have come up with so far.
PS! Thanks for the great job of creating this plugin!
@bisand Looks like the issue is that you're using npm overrides and it doesn't work like pnpm resolutions :/ If you delete your lockfile and use pnpm with
"dependencies": {
"@auth/core": "^0.10.0",
"@hebilicious/authjs-nuxt": "^0.3.0-beta.2",
"h3": "1.8.0-rc.3",
"nitropack": "npm:nitropack-edge@latest"
},
"resolutions": {
"h3": "1.8.0-rc.3",
"nitropack": "npm:nitropack-edge@latest"
}
it will work.
pnpm is bundled with node now, so you can do
RUN corepack enable && corepack prepare pnpm@latest --activate
in a dockerfile to use it.
That did the trick!
Thanks!
Environment
Related to Cloudflare pages
Inside devcontainer:
Outside devcontainer:
Node:
from packages.json
Reproduction
Can be reproduced from here using devcontainer or not: https://github.com/bisand/blog-test
Build step:
Run Cloudflare pages locally:
Describe the bug
This issue is related to Cloudflare pages using nuxt 3.6.5 and @hebilicious/authjs-nuxt 0.3.0-beta.2. The error occurs both on local (wrangler) and on Cloudflare.
Not sure if this is a bug in your component or any of the dependencues, but the error occurred after installing and running v0.3.0-beta.2
This code section seems to be the culprit. Withouth further investigation, it seems to be a part of an auto generated javascript by Wrangler, located in the /tmp/ folder. In this particular case: /tmp/tmp-3050-TxBjBovMveML/index.js
I would be
Additional context
Link to generated javascript file: /tmp/tmp-3050-TxBjBovMveML/index.js
Logs
No response