Skip to content

[🐞] ../../npm/node_modules/@panva/hkdf/dist/node/esm/runtime/fallback.js (1:9): "createHmac" is not exported by "__vite-browser-external", imported by "../../npm/node_modules/@panva/hkdf/dist/node/esm/runtime/fallback.js". #7120

Open
@Nefcanto

Description

@Nefcanto

Which component is affected?

Qwik Runtime

Describe the bug

I upgraded to Vite 6 and @auth/qwik and this happened:

../../npm/node_modules/@panva/hkdf/dist/node/esm/runtime/fallback.js (1:9): "createHmac" is not exported by "__vite-browser-external", imported by "../../npm/node_modules/@panva/hkdf/dist/node/esm/runtime/fallback.js".

This is the complete error:

x Build failed in 4.57s
error during build:
../../npm/node_modules/@panva/hkdf/dist/node/esm/runtime/fallback.js (1:9): "createHmac" is not exported by "__vite-browser-external", imported by "../../npm/node_modules/@panva/hkdf/dist/node/esm/runtime/fallback.js".
file: /npm/node_modules/@panva/hkdf/dist/node/esm/runtime/fallback.js:1:9

1: import { createHmac } from 'crypto';
            ^
2: export default (digest, ikm, salt, info, keylen) => {
3:     const hashlen = parseInt(digest.substr(3), 10) >> 3 || 20;

    at getRollupError (file:///npm/node_modules/rollup/dist/es/shared/parseAst.js:396:41)
    at error (file:///npm/node_modules/rollup/dist/es/shared/parseAst.js:392:42)
    at Module.error (file:///npm/node_modules/rollup/dist/es/shared/node-entry.js:15593:16)
    at Module.traceVariable (file:///npm/node_modules/rollup/dist/es/shared/node-entry.js:16042:29)
    at ModuleScope.findVariable (file:///npm/node_modules/rollup/dist/es/shared/node-entry.js:13825:39)
    at ReturnValueScope.findVariable (file:///npm/node_modules/rollup/dist/es/shared/node-entry.js:5288:38)
    at FunctionBodyScope.findVariable (file:///npm/node_modules/rollup/dist/es/shared/node-entry.js:5288:38)
    at Identifier.bind (file:///npm/node_modules/rollup/dist/es/shared/node-entry.js:5071:40)
    at CallExpression.bind (file:///npm/node_modules/rollup/dist/es/shared/node-entry.js:2658:23)
    at CallExpression.bind (file:///npm/node_modules/rollup/dist/es/shared/node-entry.js:11289:15)

❌ Error: Client build failed: Error: Command failed with exit code 1: npm run build.client

Reproduction

No MRE

Steps to reproduce

No response

System Info

System:
    OS: Linux 6.8 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (8) x64 Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
    Memory: 8.63 GB / 15.50 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 22.11.0 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.9.1 - /usr/local/bin/npm
  Browsers:
    Chromium: 131.0.6778.85
  npmPackages:
    @builder.io/partytown: ^0.10.2 => 0.10.2 
    @builder.io/qwik: ^1.11.0 => 1.11.0 
    @builder.io/qwik-auth: ^0.2.2 => 0.2.2 
    @builder.io/qwik-city: ^1.11.0 => 1.11.0 
    typescript: ^5.6.3 => 5.7.2 
    undici: ^6.21.0 => 6.21.0 
    vite: ^6.0.1 => 6.0.2

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions