Open LilDinker opened 2 months ago
The website works as expected when run locally on my Windows machine, but deploying to Linux has made an issue I resolved previously resurface.
I don't think the difference of OS will cause the problem. Guess the issue is caused by the difference between production and development. Could you try vite build
and vite preview
, then confirm that it happened in production?
Here is a check list:
Check dist/cesium-package
to confirm the statics and Cesium.js
were copied correctly.
Could you show me your index.html
? The problem may be about setBaseUrl and importCesium.
Hello. I am trying to deploy my website onto a Linux VM (Redhat 8). The website works as expected when run locally on my Windows machine, but deploying to Linux has made an issue I resolved previously resurface. I can't quite confirm that this is an issue with
vite-plugin-cesium-build
orcesium-use,
but I am fairly confident it is one or the other. Specifically, when I run my vite application, I get:I believe that the second error is caused by the first, and its due to the fact that Cesium is not being bundled properly and HTML is being referenced where it shouldn't be. I saw this on Windows a few weeks ago, and I fixed it by changing my vite/typescript configuration settings, specifically my module and moduleResolution:
Here is my tsconfig.app.json:
Here is my tsconfig.node.json:
Here is my tsconfig.json:
And here it my vite.config.m.ts:
I have tried changing the "module" and "moduleResolution" values to a few others and have had no success. Other than that I am kind of stumped. Do you have any idea or insight on how to fix? Here is my npm list, if that helps:
and I am running on Node version 20.11.0.
Thank you in advance for any help you can provide!