esm-dev / esm.sh

A fast, smart, & global CDN for modern(es2015+) web development.
https://esm.sh
MIT License
2.95k stars 143 forks source link

Failed to import bcrypt #843

Closed thesmart closed 3 weeks ago

thesmart commented 3 weeks ago

Failing module

import bcrypt from 'https://esm.sh/bcrypt@5.0.1';

Error message

After running deno run I got this:

error: Import 'https://esm.sh/v135/@mapbox/node-pre-gyp@1.0.11/denonext/node-pre-gyp.mjs' failed: 500 Internal Server Error
    at https://esm.sh/bcrypt@5.0.1:2:8

Additional info

thesmart commented 3 weeks ago

A workaround for anyone viewing this is to use bcryptjs instead.

ije commented 3 weeks ago

node native module doesn't work in deno via http import, please use npm:bcrypt instead