denoland/deno

PermissionDenied error when using npm package

bardouni opened this issue · 3 comments

I'm trying to use the The official MongoDB driver for Node in deno and it throws this error:

image

Deno version: deno 1.25.1
Command: deno run -A --compat --unstable --watch=static/,routes/ dev.ts

Thank you

bfkss commented

I get an different but maybe related error: error: Uncaught (in promise) Error: Cannot find module 'crypto'

I am importing with the new experimental npm support
import { MongoClient } from 'npm:mongodb'
and executing with
deno run --unstable -A --watch=static/,routes/ dev.ts
with the fresh-framework.

Deno version 1.25.1

@bfkss npm: specifiers are currently not supported in fresh, so it's not related to this issue.

@bartlomieju right
I moved the code to a standalone file and got this error now, which i think is related to the package itself
image
Thank you