[GH-ISSUE #619] Excessive console logs in development logs #8346

Closed
opened 2026-04-13 03:25:11 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @bai on GitHub (Nov 22, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/619

Describe the bug

When following Next.js installation guide, getting excessive warnings in dev console logs:

 GET /api/auth/get-session 200 in 813ms
 GET /api/auth/get-session?currentURL=http%3A%2F%2Flocalhost%3A3000%2F 200 in 514ms
 ⚠ ./node_modules/.pnpm/better-auth@1.0.0-canary.14/node_modules/better-auth/dist
Package oslo can't be external
The request oslo matches serverExternalPackages (or the default list).
The request could not be resolved by Node.js from the project directory.
Packages that should be external need to be installed in the project directory, so they can be resolved from the output files.
Try to install it into the project directory by running npm install oslo from the project directory.

To Reproduce
Steps to reproduce the behavior:

  1. Follow guide
  2. Add social signin with Google.
  3. Run pnpm dev and try logging in with google.

Expected behavior

Clear console logs.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Happens server-side
  • Version: 22 LTS
Originally created by @bai on GitHub (Nov 22, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/619 **Describe the bug** When following Next.js installation guide, getting excessive warnings in dev console logs: ``` GET /api/auth/get-session 200 in 813ms GET /api/auth/get-session?currentURL=http%3A%2F%2Flocalhost%3A3000%2F 200 in 514ms ⚠ ./node_modules/.pnpm/better-auth@1.0.0-canary.14/node_modules/better-auth/dist Package oslo can't be external The request oslo matches serverExternalPackages (or the default list). The request could not be resolved by Node.js from the project directory. Packages that should be external need to be installed in the project directory, so they can be resolved from the output files. Try to install it into the project directory by running npm install oslo from the project directory. ``` **To Reproduce** Steps to reproduce the behavior: 1. Follow [guide](https://beta.better-auth.com/docs/integrations/next) 2. Add social signin with Google. 3. Run `pnpm dev` and try logging in with google. **Expected behavior** Clear console logs. **Screenshots** If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: MacOS - Browser: Happens server-side - Version: 22 LTS
GiteaMirror added the locked label 2026-04-13 03:25:11 -05:00
Author
Owner

@avanderbergh commented on GitHub (Nov 22, 2024):

This is a NextJS-specific error...

Here we can see that the olso package is included in the default list of packages not bundled by Next.

So, you should probably add olso as a direct dependency to your project?

<!-- gh-comment-id:2494249074 --> @avanderbergh commented on GitHub (Nov 22, 2024): This is a NextJS-specific error... [Here](https://nextjs.org/docs/app/api-reference/next-config-js/serverExternalPackages) we can see that the `olso` package is included in the default list of packages not bundled by Next. So, you should probably add `olso` as a direct dependency to your project?
Author
Owner

@bai commented on GitHub (Nov 22, 2024):

Yep I'm doing that! Decided to report in case that was something to look into (code-wise or docs-wise).

<!-- gh-comment-id:2494331498 --> @bai commented on GitHub (Nov 22, 2024): Yep I'm doing that! Decided to report in case that was something to look into (code-wise or docs-wise).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8346