Inferred Type Cannot Be Named with Nanostores

I'm encountering the following TypeScript error when trying to set up authentication.
import { createAuthClient } from "better-auth/react";
import { magicLinkClient } from "better-auth/client/plugins";

export const authClient = createAuthClient({
baseURL: "http://localhost:3000",
plugins: [magicLinkClient()],
});
import { createAuthClient } from "better-auth/react";
import { magicLinkClient } from "better-auth/client/plugins";

export const authClient = createAuthClient({
baseURL: "http://localhost:3000",
plugins: [magicLinkClient()],
});
The error message is:
The inferred type of 'authClient' cannot be named without a reference to '.pnpm/[email protected]/node_modules/nanostores'. This is likely not portable. A type annotation is necessary.
The inferred type of 'authClient' cannot be named without a reference to '.pnpm/[email protected]/node_modules/nanostores'. This is likely not portable. A type annotation is necessary.
I'm using Turborepo and have TypeScript enabled in my setup. How can I resolve this error? Do I need to add a type annotation somewhere, or is there a better way to handle this issue in a monorepo with Turborepo? Thanks in advance for any help!
Solution:
install nanostores
Jump to solution
2 Replies
Solution
bekacru
bekacru2mo ago
install nanostores
ぱいなぷー
ぱいなぷーOP2mo ago
Thank you, I've got it sovled. I really appreciate your amazing project!

Did you find this page helpful?