too_easy
too_easy6mo ago

[Resolved] - TypeError: Cannot destructure property 'signIn' of useAuthActions

Using @tanstack/start and when I go to create a signin component:
import { useAuthActions } from "@convex-dev/auth/react";

const Signup = () => {
const { signIn } = useAuthActions();

return <div>Hello</div>
}
import { useAuthActions } from "@convex-dev/auth/react";

const Signup = () => {
const { signIn } = useAuthActions();

return <div>Hello</div>
}
Get the error:
Error in renderToPipeableStream: TypeError: Cannot destructure property 'signIn' of '__vite_ssr_import_1__.useAuthActions(...)' as it is undefined.
Error in renderToPipeableStream: TypeError: Cannot destructure property 'signIn' of '__vite_ssr_import_1__.useAuthActions(...)' as it is undefined.
Also seems that my IDE can't pick up and autocomplete useAuthActions either?
7 Replies
Convex Bot
Convex Bot6mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
too_easy
too_easyOP6mo ago
Also does not work with setting {ssr: false} on the createFileRoute function
compilerOptions: {
"rootDir": ".",
"baseUrl": ".",
/* Standardised modules */
"moduleResolution": "Bundler",
"module": "ESNext",
"target": "ESNext",
/* General rules across the repo */
"allowJs": true,
"strict": true,
"skipLibCheck": true,
"strictNullChecks": true,
"allowSyntheticDefaultImports": true,
"isolatedModules": true,
}
compilerOptions: {
"rootDir": ".",
"baseUrl": ".",
/* Standardised modules */
"moduleResolution": "Bundler",
"module": "ESNext",
"target": "ESNext",
/* General rules across the repo */
"allowJs": true,
"strict": true,
"skipLibCheck": true,
"strictNullChecks": true,
"allowSyntheticDefaultImports": true,
"isolatedModules": true,
}
too_easy
too_easyOP6mo ago
No description
too_easy
too_easyOP6mo ago
Resolved - but only god knows why.. 🤦‍♂️
ibrahimyaacob
ibrahimyaacob4mo ago
facing the same issue right now
No description
ibrahimyaacob
ibrahimyaacob4mo ago
Restart dev server and the issue goes away
erquhart
erquhart4mo ago
hmm so happening in both TanStack and Next v14. Any repro steps for anyone that hits this again would be helpful. Strange for a bundling error to come and go like this.

Did you find this page helpful?