motdotla / dotenv

Loads environment variables from .env for nodejs projects.
https://www.dotenvx.com
BSD 2-Clause "Simplified" License
19.01k stars 853 forks source link

Crypto #800

Closed MathiasBojda closed 7 months ago

MathiasBojda commented 7 months ago

It would behove you to update crypto in lib/main.js to crypto-js, as the crypto package is long depcrecated.

`Failed to resolve entry for package "crypto". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]

node_modules/dotenv/lib/main.js:4:23:
  4 │ const crypto = require('crypto')`

Fixed it by trying to going into node_modues/lib/main.js and manually change to crypto-js. Fixed that issue.

motdotla commented 7 months ago

what version of node are you on? this is node's crypto lib - it's not a separate npm module.

https://nodejs.org/api/crypto.html