-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
app-vite 2 and ssr start is failing without any error #17365
Comments
Seems like Vite's Rollup incorrectly bundles the production code for the server-side part and introduces a circular import statement which Node.js can't handle -- and simply exits without any warning. Will look if we can do some workaround. If not, we'll need to report this to Rollup. |
I have the same problem, node process (ssr build) exits without any error, when I import files from /boot and also import the same file somewhere else in the project. Running in dev mode works without any issues. But it is somehow hard to reproduce, some files also work - and after some other changes exactly removing these files "fixes" the problem for the meanwhile. I guess the reason is, that the boot files gets imported somehow "dynamic" by quasar. Someone found some hack to avoid that for now? How can I disable the bundling for PROD builds at all for the moment? Using @quasar/app-vite 2.0.0-beta.19/20 also makes no change... Update: Problem is somehow related to Pinia and Tree Shaking
|
After (some hours) of deeper investigation I figured out, that the problem occurs when using the store in the App component (App.vue) AND in the boot file. The generated server code for the bootfile asset looks completely different when using the store in App also. I don´t have enough knowledge to understand the reason, but I found a silly workaround for me:
Now everything works without issues, just the prefetch in Master is not working anymore. I solved that by moving that code to the bootfile. Using the store in the Layout or Page component is no problem, because it gets imported dynamically by the router (I guess). Hope someone has a better idea how to really fix that. |
What happened?
When I built using the command
quasar build -m ssr
and tried running it with the commandnpm run start
, I found that the server did not run and no errors were found.I encountered a rather strange situation. Upon investigation, I found that the variable
PrefixKey
from the fileutils/constants.ts
is being called in bothboot/requireAuth.ts
andstores/example-store.ts
. WhenPrefixKey
is called simultaneously in both places, after building and running, it does not run, and no errors are found. However, if the call to PrefixKey is removed from one of the files, it runs normally after building.utils/constants.ts
stores/example-store.ts
boot/requireAuth.ts
App.vue
in dev mode work's fine.
What did you expect to happen?
Display error when start failed.
Reproduction URL
https://github.com/bekaku/quasar-start-fail
How to reproduce?
npm install
npm run build:ssr
cd/dist/ssr
npm install
npm run start
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
SSR Mode
Platforms/Browsers
Other
Quasar info output
Relevant log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: