opral / monorepo

globalization ecosystem && change control SDK
https://opral.com
Apache License 2.0
1.16k stars 94 forks source link

[bug] Cannot integrate with SvekteKit Flash Message #1223

Closed anhtuank7c closed 1 year ago

anhtuank7c commented 1 year ago

Did you check if the config file includes errors?

Problem

Since sveltekit-flash-message required some changes in +layout.server.ts https://github.com/ciscoheat/sveltekit-flash-message#2-wrap-the-load-function-of-a-top-level-layout-or-page-route

So it crash the inlang loader.

Screenshot 2023-08-09 at 17 12 34

Expected behavior

No response

Reproduction

Init a new project, install inlang sdk, install sveltekit-flash-message

System Info

System:
    OS: macOS 13.4.1
    CPU: (8) arm64 Apple M1
    Memory: 88.75 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.13.0 - ~/Library/pnpm/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.19.3 - ~/Library/pnpm/npm
    pnpm: 7.22.0 - ~/Library/pnpm/pnpm
    Watchman: 2022.10.03.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 115.0.5790.170
    Safari: 16.5.2
  npmPackages:
    @inlang/sdk-js: ^0.11.4 => 0.11.4 
    @sveltejs/adapter-auto: ^2.0.0 => 2.1.0 
    @sveltejs/kit: ^1.20.4 => 1.22.4 
    svelte: ^4.0.5 => 4.1.2

Other information

No response

ivanhofer commented 1 year ago

Init a new project, install inlang sdk, install sveltekit-flash-message

Please send us a link to a repository. Even if it is just 3 simple steps, the outcome is often not 100% the same as you set it up and then we need to experiment to reproduce the same outcome. It takes some time to create a new project (question: which options did you choose?), read the docs, figure things out and set it up (question: what does your inlang config look like?). You are saving us at least 10 minutes (if we set it up exaclty like you did) if we can just clone a repository and immediately see the issue.

anhtuank7c commented 1 year ago

@ivanhofer Thank you so much for reply. I've created a repo right here https://github.com/anhtuank7c/sveltekit-inlang-flashmessage/blob/main/src/routes/%2Blayout.server.ts Please help to check.

ivanhofer commented 1 year ago

Thanks for the repo. The issue was fixed in version 0.11.5

anhtuank7c commented 1 year ago

Oh, Thank you a lot @ivanhofer