You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone, today I was trying to use from inside a serveFn a function the Nitro machinery, in particular useStorage for the server-side asset import.
Here an example repository made today from tanstack-start: https://github.com/eisterman/bug-usestorage
It seems that it's not possible to use some Nitro features from inside Tanstack Start.
During my investigation I found the following things:
Using "nitro": "latest" make the program simply crash at the import of useStorage(). Using instead `"nitro": "npm:nitro-nightly@latest" fix the crash.
Even with the cash fixed, calling useStorage just doesn't work returning null and raising a warning in console about missing Nitro builder or plugin.
I have tried swapping the order of nitro() and tanstackStart() Vite plugins, but nothing changed on this aspect.
I tried useStorage from a Server Route handler (not present in this repo), but nothing changed.
I'm completely lost on this right now, what can I do?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, today I was trying to use from inside a serveFn a function the Nitro machinery, in particular
useStoragefor the server-side asset import.Here an example repository made today from tanstack-start: https://github.com/eisterman/bug-usestorage
It seems that it's not possible to use some Nitro features from inside Tanstack Start.
During my investigation I found the following things:
"nitro": "latest"make the program simply crash at the import ofuseStorage(). Using instead `"nitro": "npm:nitro-nightly@latest" fix the crash.nitro()andtanstackStart()Vite plugins, but nothing changed on this aspect.useStoragefrom a Server Route handler (not present in this repo), but nothing changed.I'm completely lost on this right now, what can I do?
Beta Was this translation helpful? Give feedback.
All reactions