Click here to Skip to main content
15,882,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is my `deps.ts` file:

deps.ts:

JavaScript
export {
      Application,
      Router,
      Context,
      send,
    } from "https://deno.land/x/oak@v9.0.1/mod.ts";
    export type { RouterContext } from "https://deno.land/x/oak@v9.0.1/mod.ts";
    export { MongoClient } from "https://deno.land/x/mongo@v0.27.0/mod.ts";
    export {
      hashSync,
      compareSync,
    } from "https://deno.land/x/bcrypt@v0.2.4/mod.ts";
    import "https://deno.land/x/dotenv@v3.0.0/load.ts";
    export { create, verify, decode, getNumericDate,  }  from "https://deno.land/x/djwt@v2.4/mod.ts";


And this is a part of code that I think the error comes from:

auth_controller.ts:


JavaScript
import {
      create, verify, decode, getNumericDate, RouterContext, hashSync, compareSync
    } from "../deps.ts";
    import { userCollection } from "../mongo.ts";
    import User from "../models/user.ts";


What I have tried:

This is the error message I receive:

JavaScript
error: An unsupported media type was attempted to be imported as a
 module.   Specifier:
 file:///C:/NewP/app_back/controllers/auth_controller   MediaType:
 Unknown
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900