Skip to content

Bug: "TypeError: Cannot read properties of undefined (reading 'slice')" when using Node.js crypto module #111

@sebastianhaberey

Description

@sebastianhaberey

Summary

Hi, I am getting the error "TypeError: Cannot read properties of undefined (reading 'slice')" when using crypto in my Vite project.

Vite version is 5.3.3.

Error message

index.ts:27 TypeError: Cannot read properties of undefined (reading 'slice')
    at node_modules/browserify-sign/node_modules/readable-stream/lib/_stream_writable.js (crypto.js?v=ef6c7699:16425:85)
    at __require (chunk-4RDJM6KU.js?v=ef6c7699:18:50)
    at node_modules/browserify-sign/node_modules/readable-stream/readable-browser.js (crypto.js?v=ef6c7699:17754:25)
    at __require (chunk-4RDJM6KU.js?v=ef6c7699:18:50)
    at node_modules/browserify-sign/browser/index.js (crypto.js?v=ef6c7699:33749:18)
    at __require (chunk-4RDJM6KU.js?v=ef6c7699:18:50)
    at node_modules/crypto-browserify/index.js (crypto.js?v=ef6c7699:39990:16)
    at __require (chunk-4RDJM6KU.js?v=ef6c7699:18:50)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions