[GH-ISSUE #4941] Cannot find module 'better-auth/lynx' or its corresponding type declarations. #10113

Closed
opened 2026-04-13 06:02:11 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @JagritGumber on GitHub (Sep 27, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/4941

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Create frontend
  2. run command on documentation bun add better-auth @lynx-js/react

The version is 1.3.18 and I can see it inside the package.json of the package it doesn't exports lynx at all

Current vs. Expected behavior

Cannot find module 'better-auth/lynx' or its corresponding type declarations.

Expected:
It to not show any error and also work, for now it doesn't have lynx inside it in the node_modules version that I have

What version of Better Auth are you using?

1.3.18

System info

{
  "system": {
    "platform": "win32",
    "arch": "x64",
    "version": "Windows 11 Home Single Language",
    "release": "10.0.26100",
    "cpuCount": 12,
    "cpuModel": "13th Gen Intel(R) Core(TM) i5-13420H",
    "totalMemory": "15.63 GB",
    "freeMemory": "2.62 GB"
  },
  "node": {
    "version": "v22.17.0",
    "env": "development"
  },
  "packageManager": {
    "name": "npm",
    "version": "10.9.2"
  },
  "frameworks": null,
  "databases": null,
  "betterAuth": {
    "version": "^1.3.18",
    "config": null
  }
}

Which area(s) are affected? (Select all that apply)

Client

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  emailAndPassword: {  
    enabled: true
  },
});

Additional context

No response

Originally created by @JagritGumber on GitHub (Sep 27, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/4941 ### Is this suited for github? - [ ] Yes, this is suited for github ### To Reproduce 1. Create frontend 2. run command on documentation `bun add better-auth @lynx-js/react` The version is 1.3.18 and I can see it inside the package.json of the package it doesn't exports lynx at all ### Current vs. Expected behavior Cannot find module 'better-auth/lynx' or its corresponding type declarations. Expected: It to not show any error and also work, for now it doesn't have lynx inside it in the node_modules version that I have ### What version of Better Auth are you using? 1.3.18 ### System info ```bash { "system": { "platform": "win32", "arch": "x64", "version": "Windows 11 Home Single Language", "release": "10.0.26100", "cpuCount": 12, "cpuModel": "13th Gen Intel(R) Core(TM) i5-13420H", "totalMemory": "15.63 GB", "freeMemory": "2.62 GB" }, "node": { "version": "v22.17.0", "env": "development" }, "packageManager": { "name": "npm", "version": "10.9.2" }, "frameworks": null, "databases": null, "betterAuth": { "version": "^1.3.18", "config": null } } ``` ### Which area(s) are affected? (Select all that apply) Client ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, }); ``` ### Additional context _No response_
GiteaMirror added the lockedbug labels 2026-04-13 06:02:11 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 27, 2025):

Hi @JagritGumber! I'm Dosu and I’m helping the better-auth team.

The error happens because 'better-auth/lynx' is not exported in the Better Auth package version 1.3.18, even though the Lynx client code exists in the repo. The package.json for this version does not include a 'lynx' export, so you can't import it directly, and TypeScript/Node will throw a module not found error. This matches what you see in your node_modules and is not a local install issue—it's a packaging or publishing oversight for this release [source].

Documentation and PRs show Lynx integration was added in v1.3.9 and should be available, but the actual export is missing in your installed package [source]. If you need Lynx features, you’ll need to wait for a fix or update that correctly exports 'lynx', or consider using the main client API or another supported frontend integration for now. If you want to verify, check the "exports" field in your installed better-auth/package.json—if 'lynx' isn’t listed, it can’t be imported.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

<!-- gh-comment-id:3341562524 --> @dosubot[bot] commented on GitHub (Sep 27, 2025): <!-- Greeting --> Hi @JagritGumber! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> The error happens because 'better-auth/lynx' is not exported in the Better Auth package version 1.3.18, even though the Lynx client code exists in the repo. The package.json for this version does not include a 'lynx' export, so you can't import it directly, and TypeScript/Node will throw a module not found error. This matches what you see in your node_modules and is not a local install issue—it's a packaging or publishing oversight for this release [[source]](https://github.com/better-auth/better-auth/blob/f6cbdcc84ee5d2971fdcc8b23ff7c174f88cf45b/packages/better-auth/package.json). Documentation and PRs show Lynx integration was added in v1.3.9 and should be available, but the actual export is missing in your installed package [[source]](https://github.com/better-auth/better-auth/pull/4470). If you need Lynx features, you’ll need to wait for a fix or update that correctly exports 'lynx', or consider using the main client API or another supported frontend integration for now. If you want to verify, check the "exports" field in your installed better-auth/package.json—if 'lynx' isn’t listed, it can’t be imported. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/88c681fb-7e2d-4d50-a25a-8e4823d19535?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/88c681fb-7e2d-4d50-a25a-8e4823d19535?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/88c681fb-7e2d-4d50-a25a-8e4823d19535?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/88c681fb-7e2d-4d50-a25a-8e4823d19535?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/88c681fb-7e2d-4d50-a25a-8e4823d19535?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/88c681fb-7e2d-4d50-a25a-8e4823d19535?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/88c681fb-7e2d-4d50-a25a-8e4823d19535?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/4941)
Author
Owner

@JagritGumber commented on GitHub (Sep 27, 2025):

@dosu It's not listed in the exports even on v1.3.9, and forget exports I believe it's not even getting packaged, if there is no open issue I am glad to fix it, Could you please also tell me how long it me take for any PR to get merged on average for issues like this

<!-- gh-comment-id:3341583219 --> @JagritGumber commented on GitHub (Sep 27, 2025): @dosu It's not listed in the exports even on v1.3.9, and forget exports I believe it's not even getting packaged, if there is no open issue I am glad to fix it, Could you please also tell me how long it me take for any PR to get merged on average for issues like this
Author
Owner

@dosubot[bot] commented on GitHub (Sep 27, 2025):

You're right—'lynx' isn't exported or packaged in better-auth v1.3.18, even though the source code exists. To fix this, you should add an export for './lynx' in the exports field of packages/better-auth/package.json, similar to how other submodules are exported, and make sure the build scripts include the compiled output for lynx in dist/client/lynx [source]. Use the structure for client/react or client/solid as a reference.

Recent packaging/export PRs (like #4916) were merged in about 2 days, so fixes like this are typically reviewed and merged quickly if they're straightforward and well-prepared [source]. If you submit a PR with the necessary changes, you can expect a similar timeline.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

<!-- gh-comment-id:3341586357 --> @dosubot[bot] commented on GitHub (Sep 27, 2025): <!-- Answer --> You're right—'lynx' isn't exported or packaged in better-auth v1.3.18, even though the source code exists. To fix this, you should add an export for './lynx' in the `exports` field of `packages/better-auth/package.json`, similar to how other submodules are exported, and make sure the build scripts include the compiled output for lynx in `dist/client/lynx` [[source]](https://github.com/better-auth/better-auth/blob/f6cbdcc84ee5d2971fdcc8b23ff7c174f88cf45b/packages/better-auth/package.json). Use the structure for `client/react` or `client/solid` as a reference. Recent packaging/export PRs (like #4916) were merged in about 2 days, so fixes like this are typically reviewed and merged quickly if they're straightforward and well-prepared [[source]](https://github.com/better-auth/better-auth/pull/4916). If you submit a PR with the necessary changes, you can expect a similar timeline. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/4399d817-028a-41fd-8938-e26f69cb5a84?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/4399d817-028a-41fd-8938-e26f69cb5a84?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/4399d817-028a-41fd-8938-e26f69cb5a84?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/4399d817-028a-41fd-8938-e26f69cb5a84?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4399d817-028a-41fd-8938-e26f69cb5a84?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/4399d817-028a-41fd-8938-e26f69cb5a84?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/4399d817-028a-41fd-8938-e26f69cb5a84?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/4941)
Author
Owner

@JagritGumber commented on GitHub (Sep 27, 2025):

#4950 Should fix this issue

I'm closing this issue, and for anyone coming in future just look if this pull request is merged or not

<!-- gh-comment-id:3342010846 --> @JagritGumber commented on GitHub (Sep 27, 2025): #4950 Should fix this issue I'm closing this issue, and for anyone coming in future just look if this pull request is merged or not
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#10113