ciscoheat / sveltekit-flash-message

Send temporary data after redirect, usually from endpoints. Works with both SSR and client.
https://www.npmjs.com/package/sveltekit-flash-message
MIT License
246 stars 5 forks source link

Cannot read properties of undefined (reading 'SSR') #2

Closed rburgst closed 1 year ago

rburgst commented 1 year ago
Cannot read properties of undefined (reading 'SSR')
TypeError: Cannot read properties of undefined (reading 'SSR')
    at file:///Users/user/git/app/node_modules/sveltekit-flash-message/client.js:7:34
    at ModuleJob.run (node:internal/modules/esm/module_job:185:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
    at async nodeImport (file:///Users/user/git/app/node_modules/vite/dist/node/chunks/dep-3ffe6dd0.js:53401:21)
    at async eval (/src/routes/pages/[uid]/+page.svelte:23:31)
    at async instantiateModule (file:///Users/user/git/app/node_modules/vite/dist/node/chunks/dep-3ffe6dd0.js:53330:9)

Have the following versions:

        "@sveltejs/adapter-node": "1.0.0-next.88",
        "sveltekit-flash-message": "^0.6.2",
        "vite": "^3.1.0-beta.1",
        "@sveltejs/kit": "1.0.0-next.457",
rburgst commented 1 year ago

ups, was missing the config in vite.config.ts

ciscoheat commented 1 year ago

I'm sorry for the configuration required to make it work, I hope sveltekit can make it easier for libraries like this in the future...