[PR #3183] [MERGED] update jose to fix vite build #4694

Closed
opened 2026-03-13 11:56:03 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3183
Author: @taivo
Created: 6/27/2025
Status: Merged
Merged: 6/27/2025
Merged by: @Bekacru

Base: mainHead: main


📝 Commits (1)

  • 9f76d69 update jose to fix vite build

📊 Changes

2 files changed (+385 additions, -187 deletions)

View changed files

📝 packages/better-auth/package.json (+1 -1)
📝 pnpm-lock.yaml (+384 -186)

📄 Description

Vite build recently started breaking (vite 6.3.5 and 7) with the following error:

../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/digest.js (1:9): "createHash" is not exported by "__vite-browser-external", imported by "../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/digest.js".
file: /.../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/digest.js:1:9

1: import { createHash } from 'node:crypto';
            ^
2: const digest = (algorithm, data) => createHash(algorithm).update(data).digest();
3: export default digest;

    at getRollupError (file:///.../node_modules/.pnpm/rollup@4.44.1/node_modules/rollup/dist/es/shared/parseAst.js:401:41)

Updating the jose package fixes it.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/3183 **Author:** [@taivo](https://github.com/taivo) **Created:** 6/27/2025 **Status:** ✅ Merged **Merged:** 6/27/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`9f76d69`](https://github.com/better-auth/better-auth/commit/9f76d693ea88759b70029e6f21049857890e25a9) update jose to fix vite build ### 📊 Changes **2 files changed** (+385 additions, -187 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/package.json` (+1 -1) 📝 `pnpm-lock.yaml` (+384 -186) </details> ### 📄 Description Vite build recently started breaking (vite 6.3.5 and 7) with the following error: ``` ../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/digest.js (1:9): "createHash" is not exported by "__vite-browser-external", imported by "../../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/digest.js". file: /.../node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/digest.js:1:9 1: import { createHash } from 'node:crypto'; ^ 2: const digest = (algorithm, data) => createHash(algorithm).update(data).digest(); 3: export default digest; at getRollupError (file:///.../node_modules/.pnpm/rollup@4.44.1/node_modules/rollup/dist/es/shared/parseAst.js:401:41) ``` Updating the `jose` package fixes it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 11:56:03 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#4694