New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Error with ^1.24.0
(SvelteKit, Lucia-Auth and Cloudflare Pages)
#698
Comments
Thanks for letting us know. I'll start working on it. |
Hey, we are running tests against cloudflare workers in the CI and that works, so I'm a bit confused about it. Either way, could you try and do what the error suggests and report back if it solves it?
|
Hi, I'm still getting the error. You can check out this PR to reproduce the error. The build job fails with the same error. You can reproduce it locally by following these steps
It cloud be due to using SvelteKit. SvelteKit uses vite to run it the build and then the sveltekit cloudflare plugin handles the transformation of the vite build to something wrangler can work with. The error seems to be happening while vite attempts to bundle the app. I've copy&pasted the build-output below. I'm on a Linux system. node:internal/event_target:1083
process.nextTick(() => { throw err; });
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/dle/DevWork/me/cloudkit/node_modules/.pnpm/@upstash+redis@1.24.3/node_modules/crypto-js/enc-hex' imported from /home/dle/DevWork/me/cloudkit/node_modules/.pnpm/@upstash+redis@1.24.3/node_modules/@upstash/redis/chunk-KBK5EDMP.mjs
Did you mean to import crypto-js@4.2.0/node_modules/crypto-js/enc-hex.js?
at new NodeError (node:internal/errors:406:5)
at finalizeResolution (node:internal/modules/esm/resolve:233:11)
at moduleResolve (node:internal/modules/esm/resolve:845:10)
at defaultResolve (node:internal/modules/esm/resolve:1043:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:228:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36)
Emitted 'error' event on Worker instance at:
at [kOnErrorMessage] (node:internal/worker:326:10)
at [kOnMessage] (node:internal/worker:337:37)
at MessagePort.<anonymous> (node:internal/worker:232:57)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:807:20)
at exports.emitMessage (node:internal/per_context/messageport:23:28) {
url: 'file:///home/dle/DevWork/me/cloudkit/node_modules/.pnpm/@upstash+redis@1.24.3/node_modules/crypto-js/enc-hex',
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v20.9.0
ELIFECYCLE Command failed with exit code 1.
}
Node.js v20.9.0
ELIFECYCLE Command failed with exit code 1.
``` |
I tested with this CF Example and it worked. Looks like it's not working when paired with cf pages. I'll check again. We might have to use opt out of crypto-js when redis/cloudflare used. |
The same error occurred when building with SveltKit using Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/study/workspace/cat-faq-bot/node_modules/crypto-js/enc-hex' imported from /home/study/workspace/cat-faq-bot/node_modules/@upstash/redis/chunk-KBK5EDMP.mjs
Did you mean to import crypto-js/enc-hex.js?
at new NodeError (node:internal/errors:405:5)
at finalizeResolution (node:internal/modules/esm/resolve:324:11)
at moduleResolve (node:internal/modules/esm/resolve:943:10)
at defaultResolve (node:internal/modules/esm/resolve:1129:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
at link (node:internal/modules/esm/module_job:76:36)
Emitted 'error' event on Worker instance at:
at [kOnErrorMessage] (node:internal/worker:300:10)
at [kOnMessage] (node:internal/worker:311:37)
at MessagePort.<anonymous> (node:internal/worker:212:57)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:741:20)
at exports.emitMessage (node:internal/per_context/messageport:23:28) {
code: 'ERR_MODULE_NOT_FOUND'
} The environment
|
Hi Guys
Just wanted to let you know that there might be a regression bug breaking some builds when trying to use the cloudflare redis client on a sveltekit project. You can reproduce it by checking out this commit: https://github.com/polaroidkidd/cloudkit/tree/28db400e4ce687045d3123c77288d0b2e2745fb6
Update the
@upstash/redis
verison to1.24.0
and then try running thepnpm preview:cf
It should produce the below errorThe text was updated successfully, but these errors were encountered: