Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run my project due to unavailable dep #348

Open
LoganTann opened this issue Jun 20, 2022 · 21 comments
Open

Unable to run my project due to unavailable dep #348

LoganTann opened this issue Jun 20, 2022 · 21 comments

Comments

@LoganTann
Copy link

I tried to add denodb to my project, but a dependency seems unavailable.

error: Import 'https://dev.jspm.io/npm:@jspm/core@1/nodelibs/timers.js' failed: 500 Internal Server Error

error: Import 'https://dev.jspm.io/npm:@jspm/core@1/nodelibs/timers.js' failed: 500 Internal Server Error

steps to reproduce

@Aiko-Suzuki
Copy link
Contributor

opened a quick pull request a 2w ago to address this issues.
#347

@LoganTann
Copy link
Author

Yes, I use your repo as import URL since I opened this issue
I hope it will get merged soon !

@slim-hmidi
Copy link

@LoganTann @Aiko-Suzuki which version of deno you are using? because with the fix that @Aiko-Suzuki did, I got these errors now:

error: TS2578 [ERROR]: Unused '@ts-expect-error' directive.
      // @ts-expect-error
      ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.106.0/node/events.ts:100:7

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
        // @ts-expect-error
        ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.106.0/node/events.ts:105:9

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
      // @ts-expect-error
      ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.106.0/node/events.ts:116:7

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
      // @ts-expect-error
      ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.106.0/node/events.ts:200:7

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
    // @ts-expect-error
    ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.106.0/node/events.ts:225:5

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
        // @ts-expect-error
        ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.106.0/node/events.ts:391:9

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
      // @ts-expect-error
      ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.106.0/node/events.ts:424:7

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
          // @ts-expect-error
          ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.106.0/node/events.ts:446:11

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
          // @ts-expect-error
          ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.106.0/node/events.ts:451:11

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
    // @ts-expect-error
    ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.106.0/node/events.ts:646:5

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
    // @ts-expect-error
    ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.106.0/node/events.ts:667:5

TS2345 [ERROR]: Argument of type 'FieldValue' is not assignable to parameter of type 'string | number | Uint8Array | ObjectId | undefined'.
  Type 'null' is not assignable to type 'string | number | Uint8Array | ObjectId | undefined'.
          whereClause.value = new Bson.ObjectId(whereClause.value);
                                                ~~~~~~~~~~~~~~~~~
    at https://raw.githubusercontent.com/Aiko-Suzuki/denodb/master/lib/connectors/mongodb-connector.ts:78:49

TS2345 [ERROR]: Argument of type 'FieldValue' is not assignable to parameter of type 'string | number | Uint8Array | ObjectId | undefined'.
              (value) => new Bson.ObjectId(value)
                                           ~~~~~
    at https://raw.githubusercontent.com/Aiko-Suzuki/denodb/master/lib/connectors/mongodb-connector.ts:152:44

Found 13 errors.

I'm using deno v1.21.3

@Aiko-Suzuki
Copy link
Contributor

Aiko-Suzuki commented Jul 13, 2022

@slim-hmidi i use 1.23 may upgrade my project to latest soon

@slim-hmidi
Copy link

it's clear, because even in the PR check there are the same log errors, you can check them https://github.com/eveningkid/denodb/pull/347/checks

@Aiko-Suzuki
Copy link
Contributor

Yeah those error are not new even without the PR #337 😕

@Aiko-Suzuki
Copy link
Contributor

Aiko-Suzuki commented Jul 13, 2022

you can run with with "--no-check" if below 1.23. if you are using 1.23 you don't need to https://deno.com/blog/v1.23 since the check is only local by default

@LoganTann
Copy link
Author

I'm using deno v1.21.3

1.22.1 in my side

@joeldesante
Copy link

Is there any progress on this issue? I see a pull request has been open but has not yet been merged.

@Aiko-Suzuki
Copy link
Contributor

The maintainer seems to not be actif :/

@joeldesante
Copy link

joeldesante commented Jul 18, 2022

I've implemented the pull request on my own fork of the project if anyone needs it and doesn't want to do it themselves.

Here is an example of the import to use for the fixed version while we wait for the pull request.

import { Relationships, DataTypes, Database, Model, SQLite3Connector } from 'https://raw.githubusercontent.com/joeldesante/denodb/master/mod.ts';

@tw-towey
Copy link

I still don't quite understand how to deal with this problem
image

@LoganTann
Copy link
Author

I still don't quite understand how to deal with this problem image

Instead of import {something} from "https://deno.land/x/denodb/mod.ts";
Do this instead : import {something} from "https://raw.githubusercontent.com/joeldesante/denodb/master/mod.ts";

@paulocr
Copy link

paulocr commented Jul 22, 2022

I've implemented the pull request on my own fork of the project if anyone needs it and doesn't want to do it themselves.

Here is an example of the import to use for the fixed version while we wait for the pull request.

import { Relationships, DataTypes, Database, Model, SQLite3Connector } from 'https://raw.githubusercontent.com/joeldesante/denodb/master/mod.ts';

There is a new error with your workaround (at least today):

Download https://raw.githubusercontent.com/Zhomart/dex/update-deps/lib/deps/tarn@3.0.0/dist/PromiseInspection.dew.js
error: Import 'https://dev.jspm.io/npm:@jspm/core@1/nodelibs/timers.js' failed: 500 Internal Server Error
    at https://dev.jspm.io/npm:tarn@3.0.2/dist/Pool.dew.js:5:21

@joeldesante
Copy link

I've implemented the pull request on my own fork of the project if anyone needs it and doesn't want to do it themselves.
Here is an example of the import to use for the fixed version while we wait for the pull request.

import { Relationships, DataTypes, Database, Model, SQLite3Connector } from 'https://raw.githubusercontent.com/joeldesante/denodb/master/mod.ts';

There is a new error with your workaround (at least today):

Download https://raw.githubusercontent.com/Zhomart/dex/update-deps/lib/deps/tarn@3.0.0/dist/PromiseInspection.dew.js
error: Import 'https://dev.jspm.io/npm:@jspm/core@1/nodelibs/timers.js' failed: 500 Internal Server Error
    at https://dev.jspm.io/npm:tarn@3.0.2/dist/Pool.dew.js:5:21

I havn't been able to reproduce this error. Are you sure you have everything correct on your end?

@paulocr
Copy link

paulocr commented Jul 22, 2022

I've implemented the pull request on my own fork of the project if anyone needs it and doesn't want to do it themselves.
Here is an example of the import to use for the fixed version while we wait for the pull request.

import { Relationships, DataTypes, Database, Model, SQLite3Connector } from 'https://raw.githubusercontent.com/joeldesante/denodb/master/mod.ts';

There is a new error with your workaround (at least today):

Download https://raw.githubusercontent.com/Zhomart/dex/update-deps/lib/deps/tarn@3.0.0/dist/PromiseInspection.dew.js
error: Import 'https://dev.jspm.io/npm:@jspm/core@1/nodelibs/timers.js' failed: 500 Internal Server Error
    at https://dev.jspm.io/npm:tarn@3.0.2/dist/Pool.dew.js:5:21

I havn't been able to reproduce this error. Are you sure you have everything correct on your end?

Yes, sorry nevermind. I think I was missing something on my end. Thanks for the workaround!

@reggi
Copy link

reggi commented Aug 20, 2022

Still seeing this:

error: Import 'https://dev.jspm.io/inherits@2.0' failed: 500 Internal Server Error
    at https://raw.githubusercontent.com/Zhomart/dex/930253915093e1e08d48ec0409b4aee800d8bd0c/lib-dyn/deps.ts:4:26

@reggi
Copy link

reggi commented Aug 20, 2022

workaround:

{
  "imports": {
    "https://dev.jspm.io/npm:@jspm/core@1/nodelibs/timers.js": "https://ga.jspm.io/npm:@jspm/core@2.0.0-beta.24/nodelibs/deno/timers.ts",
    "https://dev.jspm.io/inherits@2.0": "https://ga.jspm.io/npm:inherits@2.0.4/inherits.js",
  },
  "scopes": {
    "https://ga.jspm.io/": {
      "util": "https://ga.jspm.io/npm:@jspm/core@2.0.0-beta.24/nodelibs/deno/util.ts"
    }
  }
}

@shizhouhu
Copy link

shizhouhu commented Aug 22, 2022

it works!

@SirWrexes
Copy link

SirWrexes commented Sep 5, 2022

workaround:

{
  "imports": {
    "https://dev.jspm.io/npm:@jspm/core@1/nodelibs/timers.js": "https://ga.jspm.io/npm:@jspm/core@2.0.0-beta.24/nodelibs/deno/timers.ts",
    "https://dev.jspm.io/inherits@2.0": "https://ga.jspm.io/npm:inherits@2.0.4/inherits.js",
  },
  "scopes": {
    "https://ga.jspm.io/": {
      "util": "https://ga.jspm.io/npm:@jspm/core@2.0.0-beta.24/nodelibs/deno/util.ts"
    }
  }
}

Thanks for the fix but where do I put this ??
Writing it in a deno.json and running my code with deno --config ./deno.json run ... doesn't fix it.

@reggi
Copy link

reggi commented Sep 5, 2022

@SirWrexes the code block I put my previous comment goes into a import_map.json file.

In the deno.json you then need to add "importMap": "./import_map.json".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants