Skip to content
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

Errors Deploying to Cloudflare Pages #2905

Open
dhndmn opened this issue Oct 27, 2024 · 3 comments
Open

Errors Deploying to Cloudflare Pages #2905

dhndmn opened this issue Oct 27, 2024 · 3 comments

Comments

@dhndmn
Copy link

dhndmn commented Oct 27, 2024

I'm attempting to deploy a Svelte app to Cloudflare Pages. The app builds, but I have two issues related to @nangohq/node that are keeping me from deploying. Could someone possibly point me in the right direction of how to resolve these? Thank you!

Could not resolve "node:https"

../../node_modules/.pnpm/@[email protected]/node_modules/@nangohq/node/dist/index.js:3:18:
  3 │ import https from 'node:https';
    ╵                   ~~~~~~~~~~~~

Cannot use "node:https" when deploying to Cloudflare.

Could not resolve "os"

../../node_modules/.pnpm/@[email protected]/node_modules/@nangohq/node/dist/utils.js:1:15:
  1 │ import os from 'os';
    ╵                ~~~~

Cannot use "os" when deploying to Cloudflare.

error during build:
Error: Bundling with esbuild failed with 2 errors

Copy link

linear bot commented Oct 27, 2024

@bodinsamuel
Copy link
Collaborator

Hey
Cloudflare workers are a subset of nodes, knows to have issues with some native packages.
For https you can use the compat mode jdalrymple/gitbeaker#3505 (comment)
Not sure about os

@dhndmn
Copy link
Author

dhndmn commented Oct 28, 2024

Thanks for the tip, @bodinsamuel. Are Cloudflare Workers and Pages considered/handled the same when it comes to this? I’m not using Workers per se, but if they are the same…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants