goofysystem
goofysystem
Explore posts from servers
CDCloudflare Developers
Created by goofysystem on 3/17/2024 in #pages-help
Typesense search breaks the app when refreshing the page.
No description
2 replies
CDCloudflare Developers
Created by goofysystem on 10/12/2023 in #pages-help
Sveltekit + Lucia: Error: The script will never generate a response.
No description
2 replies
CDCloudflare Developers
Created by goofysystem on 9/13/2023 in #workers-help
403 Error using Turso in local development when running wrangler dev with `--remote` flag
LibsqlError: SERVER_ERROR: Server returned HTTP status 403
at mapHranaError (index.js:12991:12)
at HttpClient2.execute (index.js:13296:13)
at async PreparedQuery.all (index.js:13476:18)
at async index.js:14053:26
at async index.js:2793:5
at async index.js:2695:7
at async index.js:2022:62
at async jsonError (index.js:14078:12) {
code: SERVER_ERROR,
name: LibsqlError,
stack: LibsqlError: SERVER_ERROR: Server returned HTTP st…022:62
at async jsonError (index.js:14078:12),
message: SERVER_ERROR: Server returned HTTP status 403,
cause: HttpServerError: Server returned HTTP status 403
at errorFromResponse (index.js:12380:10)
a…
}
LibsqlError: SERVER_ERROR: Server returned HTTP status 403
at mapHranaError (index.js:12991:12)
at HttpClient2.execute (index.js:13296:13)
at async PreparedQuery.all (index.js:13476:18)
at async index.js:14053:26
at async index.js:2793:5
at async index.js:2695:7
at async index.js:2022:62
at async jsonError (index.js:14078:12) {
code: SERVER_ERROR,
name: LibsqlError,
stack: LibsqlError: SERVER_ERROR: Server returned HTTP st…022:62
at async jsonError (index.js:14078:12),
message: SERVER_ERROR: Server returned HTTP status 403,
cause: HttpServerError: Server returned HTTP status 403
at errorFromResponse (index.js:12380:10)
a…
}
You only get this error when running wrangler dev with --remote flag.
wrangler dev src/index.ts #works
wrangler dev src/index.ts --remote #gets libsql 403 error
wrangler dev src/index.ts #works
wrangler dev src/index.ts --remote #gets libsql 403 error
Here's a repo that demonstrates this: https://github.com/zestsystem/cloudflare-worker-turso/tree/main
3 replies
CDCloudflare Developers
Created by goofysystem on 8/24/2023 in #pages-help
@sveltejs/adapter-cloudflare problem in a monorepo
I have a local workspace package that I import into my sveltekit project. Lets say this package has kysely and @libsql/kysely as its dependencies. Consuming this package results in a build failure like this:
Could not resolve "node:stream"
.svelte-kit/output/server/entries/pages/(auth)/onboarding/_page.server.js:14:19:
14 │ import stream from "node:stream";
╵ ~~~~~~~~~~~~~
The package "node:stream" wasn't found on the file system but is built into node. Are you trying
to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.

Could not resolve "node:stream"
.svelte-kit/output/server/entries/pages/(auth)/onboarding/_page.server.js:14:19:
14 │ import stream from "node:stream";
╵ ~~~~~~~~~~~~~
The package "node:stream" wasn't found on the file system but is built into node. Are you trying
to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.

Now if I pnpm install the dependencies of the workspace package directly to the sveltekit project, so in this case kysely and @libsql/kysely, the build is successful. This means that whenever sveltekit consumes a package, I would need to make sure that sveltekit has its dependencies explicitly installed as well. I have confirmed this with a package that uses @aws-sdk as well. Build fails when @aws-sdk is not directly installed to sveltekit, works when it is installed.
3 replies