Skip to content

[UNRESOLVED_IMPORT] Warning: Could not resolve 'node:crypto' #554

@husayt

Description

@husayt

Getting this error:

[UNRESOLVED_IMPORT] Warning: Could not resolve 'node:crypto' in node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js            

 ╭─[ node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js:1:37 ]
   │
 1 │ import { webcrypto as crypto } from 'node:crypto'
   │                                     ──────┬──────
   │                                           ╰──────── Module not found, treating it as an external dependency
   │
   │ Help: The "main" field here was ignored. Main fields must be configured explicitly when using the "neutral" platform.

Stack:
node v24.13.0
os Win11

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