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

Cannot destructure property 'serverOptions' of 'useMultiCacheApp(...)' as it is undefined. #67

Open
lukas-kreuzer opened this issue Aug 7, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@lukas-kreuzer
Copy link

lukas-kreuzer commented Aug 7, 2024

Hi there,

With the update from the version 3.2.0 to 3.3.0 i get this error when I call the purgeAll endpoint. I have looked through the changes and maybe my error is caused by this line 9bd9d49#diff-ad782f9485665dc82c5135d0a2dca0a1b92cbd56a2db995202b5ed5a45344d3dR9 ?

I also noticed, that the debug output is not there anymore altough the debug flag is enabled. Maybe there is something that needs to be changed in order for this version to work? I looked through the docs but did not found anything.

As soon as I downgrade the version, the cache works as intended.

Full Error on Purge All:

{"url":"/cache/purge/all","statusCode":500,"statusMessage":"","message":"Cannot destructure property 'serverOptions' of 'useMultiCacheApp(...)' as it is undefined.","stack":"<pre><span class=\"stack internal\">at checkAuth (./node_modules/nuxt-multi-cache/dist/runtime/server/api/helpers/index.js:19:11)</span>\n<span class=\"stack internal\">at Object.handler (./node_modules/nuxt-multi-cache/dist/runtime/server/api/purgeAll.js:5:9)</span>\n<span class=\"stack internal\">at Object.handler (./node_modules/h3/dist/index.mjs:2213:34)</span>\n<span class=\"stack internal\">at ./node_modules/h3/dist/index.mjs:1975:31</span>\n<span class=\"stack internal\">at process.processTicksAndRejections (node:internal/process/task_queues:95:5)</span>\n<span class=\"stack internal\">at async Object.callAsync (./node_modules/unctx/dist/index.mjs:72:16)</span>\n<span class=\"stack internal\">at async Server.toNodeHandle (./node_modules/h3/dist/index.mjs:2266:7)</span></pre>"}
@dulnan dulnan self-assigned this Aug 25, 2024
@dulnan dulnan added the bug Something isn't working label Aug 25, 2024
@dulnan
Copy link
Owner

dulnan commented Aug 25, 2024

I'm pretty sure this is related to #69 where the nitro plugin that injects the property on the nitro app was only included if either the route or the cdn feature was enabled. So having just data or component enabled would result in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants