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

Loading css chunk failed on Arch Linux for v0.8.13 #1609

Closed
y-not-u opened this issue Sep 24, 2024 · 8 comments
Closed

Loading css chunk failed on Arch Linux for v0.8.13 #1609

y-not-u opened this issue Sep 24, 2024 · 8 comments
Assignees

Comments

@y-not-u
Copy link

y-not-u commented Sep 24, 2024

It was normal on v0.8.12, but it's not working on v0.8.13

@stormslowly
Copy link
Member

if the http error code is 504 , it will be fixed by #1612

@y-not-u
Copy link
Author

y-not-u commented Sep 25, 2024

if the http error code is 504 , it will be fixed by #1612

After I updated to v0.8.14, the async.css still responded 504.

@stormslowly
Copy link
Member

@y-not-u could plz help to investigate in Arch Linux ,the root cause is express-http-proxy request to mako hyper server with keep alive, but hyper is config to disable keep alive.

could plz try to do some modify in node_module to verify keep alive is disable or not.

btw: do you update @umijs/bundler-mako to 0.8.14 ?

@y-not-u
Copy link
Author

y-not-u commented Sep 25, 2024

@stormslowly I didn't install @umijs/bundler-mako, but I found it has been installed by other package. And the version is 0.8.13.
I don't know how to update @umijs/bunder-mako. Even though I installed version 0.8.14 manually, it still didn't work.

I'm glad to help you to find the issue.

@stormslowly
Copy link
Member

stormslowly commented Sep 25, 2024

i have tried to reproduce this case in a linux machine, but failed.

@y-not-u could you plz help to confirm the version of bundler-mako in used.

at the root of you project, run below cmd

find node_modules -name bundler-mako  -type d

check the package.json file under above output path

if the version is not 0.8.14, patch it's index.js file like this

app.use(
proxy(`http://127.0.0.1:${hmrPort}`, {
proxyReqOptDecorator: function (proxyReqOpts) {
// keep alive is on by default https://nodejs.org/docs/latest/api/http.html#httpglobalagent
// 禁用 keep-alive
proxyReqOpts.agent = false;
return proxyReqOpts;
},
filter: function (req, res) {
return req.method == 'GET' || req.method == 'HEAD';
},
skipToNextHandlerFilter: function (proxyRes) {
return proxyRes.statusCode !== 200;
},
}),

then re-run dev after, check if the problem is still here

@stormslowly
Copy link
Member

if you are using umi, you can verify it easily by change version to 4.0.0-canary.20240925.1

@y-not-u
Copy link
Author

y-not-u commented Sep 26, 2024

after executing the cmd, the output is as follows:
node_modules/.pnpm/@umijs+bundler-mako@0.8.13/node_modules/@umijs/bundler-mako.

And then I patch the index.js file, it works!
the only question is I updated @umijs/mako to ^0.8.14 but bundler-mako is still 0.8.13

@stormslowly
Copy link
Member

you can

npm ls @umijs/bundler-mako 

to inspect who introduced it

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