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

[Bug]: Cloudflare pages #3774

Closed
nickdoherty opened this issue Oct 20, 2024 · 2 comments
Closed

[Bug]: Cloudflare pages #3774

nickdoherty opened this issue Oct 20, 2024 · 2 comments
Assignees
Labels
🐞 bug Something isn't working 🎯 upstream

Comments

@nickdoherty
Copy link

Version

09:23:09.879 Executing user command: npx envinfo --system --browsers --npmPackages '@rsbuild/*' && npm run build
09:23:11.408
09:23:11.411 System:
09:23:11.411 OS: Linux 4.4 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
09:23:11.412 CPU: (8) x64 unknown
09:23:11.412 Memory: 11.25 GB / 11.56 GB
09:23:11.412 Shell: 5.1.16 - /bin/bash
09:23:11.412 Browsers:
09:23:11.412 Chrome: 128.0.6613.137
09:23:11.412 npmPackages:
09:23:11.412 @rsbuild/core: ^1.0.16 => 1.0.16
09:23:11.412 @rsbuild/plugin-assets-retry: ^1.0.3 => 1.0.3
09:23:11.412 @rsbuild/plugin-css-minimizer: ^1.0.2 => 1.0.2
09:23:11.418 @rsbuild/plugin-image-compress: ^1.0.2 => 1.0.2
09:23:11.418 @rsbuild/plugin-sass: ^1.0.4 => 1.0.4
09:23:11.418 @rsbuild/plugin-vue: ^1.0.2 => 1.0.2
09:23:11.418
09:23:12.081
09:23:12.081 > [email protected] build
09:23:12.081 > rsbuild build
09:23:12.081
09:23:12.256 Rsbuild v1.0.16
09:23:12.256
09:23:15.131 ready Built in 1.85 s (web)
09:23:15.142
09:23:15.142 File (web) Size Gzip
09:23:15.143 dist/static/js/index.5506b37a.js 6.3 kB 2.9 kB
09:23:15.143 dist/static/js/134.c1fe5771.js 7.0 kB 3.0 kB
09:23:15.143 dist/index.html 7.6 kB 2.6 kB
09:23:15.143 dist/static/js/async/892.627fcba3.js 10.8 kB 4.7 kB
09:23:15.143 dist/static/css/index.bb9f183d.css 15.1 kB 3.8 kB
09:23:15.143 dist/static/js/lib-router.daebee8e.js 22.7 kB 8.9 kB
09:23:15.143 dist/static/js/lib-vue.e7ef4edb.js 61.8 kB 23.9 kB
09:23:15.144
09:23:15.144 Total: 131.2 kB (gzip: 49.8 kB)
09:23:15.144

Details

Using Cloudflare pages and when using Rsbuild, it appears the "I'm finished, exit" command is never sent, so Cloudflare pages gets stuck doing nothing until it reaches timeout then fails.

Reproduce link

https://dash.cloudflare.com

Reproduce Steps

Steps to reproduce.

  1. Create a cloudflare page project
  2. Change the build settings to
Build command:
npx envinfo --system --browsers --npmPackages '@rsbuild/*' && npm run build
Build output directory:
/dist
Build system version:
2 (latest)
Root directory:
/
Environment variables:
None
  1. Start the build
  2. Notice that the build never completes

If you swap our rsbuild with vite/webpack, the build stage completes and deployment is a succcess.

@nickdoherty nickdoherty added the 🐞 bug Something isn't working label Oct 20, 2024
@9aoy
Copy link
Collaborator

9aoy commented Nov 5, 2024

@rsbuild/plugin-sass uses sass-embedded by default, but CloudFlare only supports Embedded Dart Sass up to 1.62.1.
To solve this problem, you can use sass Implementation instead when CloudFlare deploying:

pluginSass({
  sassLoaderOptions: {
    implementation: require.resolve('sass'),
  },
});

Related issue: sass/dart-sass#2423

@nickdoherty
Copy link
Author

Thank you @9aoy

This resolved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🎯 upstream
Projects
None yet
Development

No branches or pull requests

3 participants