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

This library breaks deployment with cloudflare #85

Open
irg1008 opened this issue Apr 5, 2024 · 5 comments
Open

This library breaks deployment with cloudflare #85

irg1008 opened this issue Apr 5, 2024 · 5 comments
Assignees

Comments

@irg1008
Copy link

irg1008 commented Apr 5, 2024

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. pnpm install
  2. build project
  3. See errors related to node APIs
  4. You may remove all astro-i18n from the project
  5. The project now builds correctly as it should

Expected behavior
We should be able to build astro project with cloudflare adapter

Mandatory reproduction repository
https://github.com/irg1008/ivanruiz

@irg1008
Copy link
Author

irg1008 commented Apr 5, 2024

I think would be "easy" to fix updating dependencies to use "node:*"

@irg1008
Copy link
Author

irg1008 commented Apr 5, 2024

[vite-plugin-pwa:build] [plugin vite:resolve] Cannot bundle Node.js built-in "fs" imported from "node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js". Consider disabling ssr.noExternal or remove the built-in dependency.
file: C:/Users/Ivan/Documents/Projects/Web/ivanruiz/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/lib/main.js
  Stack trace:
    at getRollupError (file:///C:/Users/Ivan/Documents/Projects/Web/ivanruiz/node_modules/.pnpm/rollup@4.13.0/node_modules/rollup/dist/es/shared/parseAst.js:376:41)
    at Object.error (file:///C:/Users/Ivan/Documents/Projects/Web/ivanruiz/node_modules/.pnpm/rollup@4.13.0/node_modules/rollup/dist/es/shared/node-entry.js:19378:20)
    at Object.handler (file:///C:/Users/Ivan/Documents/Projects/Web/ivanruiz/node_modules/.pnpm/vite@5.2.2_@types+node@20.11.30_lightningcss@1.24.1/node_modules/vite/dist/node/chunks/dep-B-u6xNiR.js:67458:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async resolveId (file:///C:/Users/Ivan/Documents/Projects/Web/ivanruiz/node_modules/.pnpm/rollup@4.13.0/node_modules/rollup/dist/es/shared/node-entry.js:18144:26)
 ELIFECYCLE  Command failed with exit code 1.

I have confirmed removing this library removes the error

@irg1008
Copy link
Author

irg1008 commented Apr 5, 2024

Breaks deplyment with deno deploy as well. Does this work with any SSR adapter at all?

@rodilo
Copy link

rodilo commented Nov 22, 2024

@irg1008 did you manage to make this work with cloudflare?

@irg1008
Copy link
Author

irg1008 commented Nov 22, 2024

No, ended up using netlify

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

3 participants