Closed WhoAdarshPandya closed 4 years ago
Hi,
Thanks for raising the issue. Are you sure you're using functions exported from the mod.ts file? It looks like one of your imports could be wrong if you're using the functions in src/bcrypt/bcrypt.ts
Also, regarding your deployment, it might be because you're using the --cached-only
flag and the server running it might not have the module cached?
I'd suggest double checking the imports and also removing the flag when you run the code on your deployment (or figuring a way of getting the dependencies cached?)
Let me know how it goes!
Thanks, James
i'm using import * as bcrypt from "https://deno.land/x/bcrypt/mod.ts";
as import statement
it gives functions like hashpw,gensalt
Although in Development mode hashpw and gensalt are given in suggestions , and in production mode i typed genSalt and hash (not the suggested functions in intellisense) without --cached-only flag and it seems to work fine
curios to know how it's happening?
edit : --cache-only flag was removed since it causes error like Uncaught Error: Cannot find module "https://deno.land/x/bcrypt@v0.2.4/src/worker.ts" in cache, --cached-only is specified
Got it, The cache was old so i have to use --reload flag while running file for once only now it's working like a charm
Thanks For Help, Adarsh
Ah yeah, that'll do it 😁 Glad you got it sorted!
Thanks, James
i tried to import the bcrypt like
import * as bcrypt from "https://deno.land/x/bcrypt/mod.ts";
instead of giving me functions like genSalt and hash it gave me hashpw and gensalt , however it worked passwords are hashed but when i tried to upload project on heroku with all permissions it paniced.Error:
error: Uncaught Error: Cannot find module "https://deno.land/x/bcrypt@v0.2.4/src/worker.ts" in cache, --cached-only is specified
which caused abnormal termination of whole project