-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
Problem description
When I add signed:true to the options of client.helper.buildSrc(), I get the following error:
URL signing requires Node.js crypto module which is not available in this runtime. Please use Node.js environment for URL signing functionality.
at createHmacSha1 (node_modules/@imagekit/nodejs/lib/crypto-utils.mjs:23:15)
at getSignature (node_modules/@imagekit/nodejs/resources/helper.mjs:391:12)
at Helper.buildSrc (node_modules/@imagekit/nodejs/resources/helper.mjs:79:34)
Upon further investigation, it is because the ES module is trying to call the require function, which does not exist in that context.
Please fix this error by using a static import statement instead of the dynamic require function in the ESM build of @imagekit/nodejs/lib/crypto-utils.mjs
Environment
Bundler: Vite 7.2.2 (under Nuxt 4.2.1)
Node: 24.3.0
@imagekit/nodejs: 7.1.1
Reproduction
https://bolt.new/~/sb1-dslmuuah
- Open the linked project
- Switch to the code tab <>
- Open the Terminal tab
- Run
node index.mjs - See error in the console
Metadata
Metadata
Assignees
Labels
No labels