Giter VIP home page Giter VIP logo

koreografeye-plugin's People

Contributors

phochste avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

phochste

koreografeye-plugin's Issues

mastodon plugin - `Function.prototype.apply` was called on undefined

Edit:

  • npm: 10.2.4
  • node: 21.4.0

Tried running the demo as described in README, only difference is that I ran it from the KoreografeyeDemo repo instead of this one as the base, got this traceback:

MASTODON_ACCESS_TOKEN=<ACCESS_TOKEN> npx pol --single out/mastodemo.ttl --keep -ddd
(node:9271) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
2024-01-08T19:40:23.288Z [Components.js] warn: Detected remote context lookup for 'https://linkedsoftwaredependencies.org/bundles/npm/koreografeye/^0.4.6/components/context.jsonld' in ./config.jsonld. This may indicate a missing or invalid dependency, incorrect version number, or an invalid context URL.
2024-01-08T19:40:23.312Z [Components.js] warn: Detected remote context lookup for 'https://linkedsoftwaredependencies.org/bundles/npm/koreografeye-mastodon/^1.1.1/components/context.jsonld' in ./config.jsonld. This may indicate a missing or invalid dependency, incorrect version number, or an invalid context URL.
[2024-01-08T11:40:24.769] [DEBUG] default - main subject: urn:uuid:C7A19613-4CE5-429B-B9D8-84DA391DAC98
[2024-01-08T11:40:24.770] [DEBUG] default - origin: file:///in/mastodemo.ttl
[2024-01-08T11:40:24.770] [DEBUG] default - main subject: urn:uuid:C7A19613-4CE5-429B-B9D8-84DA391DAC98
[2024-01-08T11:40:24.770] [DEBUG] default - origin: file:///in/mastodemo.ttl
[2024-01-08T11:40:24.771] [TRACE] default -
PREFIX pol: <https://www.example.org/ns/policy#>
PREFIX fno: <https://w3id.org/function/ontology#>

SELECT ?id ?policy ?executionTarget ?name ?value WHERE {
  ?id pol:policy ?policy .
  ?policy a fno:Execution .
  ?policy fno:executes ?executionTarget .
  OPTIONAL { ?policy ?name ?value . } .
}

[2024-01-08T11:40:24.811] [INFO] default - found policy http://example.org/MyDemoPolicy with target http://example.org/sendToMastodon
[2024-01-08T11:40:24.811] [INFO] default - found policy http://example.org/MyDemoPolicy with target http://example.org/sendToMastodon
[2024-01-08T11:40:24.812] [INFO] default - found policy http://example.org/MyDemoPolicy with target http://example.org/sendToMastodon
[2024-01-08T11:40:24.812] [INFO] default - found policy http://example.org/MyDemoPolicy with target http://example.org/sendToMastodon
[2024-01-08T11:40:24.812] [DEBUG] default - policies:
[2024-01-08T11:40:24.812] [DEBUG] default - {
  'http://example.org/MyDemoPolicy': {
    node: NamedNode { id: 'http://example.org/MyDemoPolicy' },
    path: 'none',
    policy: 'bc_0_b1_b0_b2_sk_0',
    target: 'http://example.org/sendToMastodon',
    args: {
      'http://www.w3.org/1999/02/22-rdf-syntax-ns#type': [NamedNode],
      'https://w3id.org/function/ontology#executes': [NamedNode],
      'http://example.org/baseurl': [Literal],
      'http://example.org/toot': [Literal]
    }
  }
}
2024-01-08T19:40:24.852Z [Components.js] error: Detected fatal error. Generated 'componentsjs-error-state.json' with more information.
TypeError: Function.prototype.apply was called on undefined, which is a undefined and not a function
    at $o (KoreografeyeDemo/node_modules/esm/esm.js:1:224377)
    at wu (KoreografeyeDemo/node_modules/esm/esm.js:1:227324)
    at Eu (KoreografeyeDemo/node_modules/esm/esm.js:1:227999)
    at Module.<anonymous> (KoreografeyeDemo/node_modules/esm/esm.js:1:295976)
    at n (KoreografeyeDemo/node_modules/esm/esm.js:1:279589)
    at Object.<anonymous> (KoreografeyeDemo/node_modules/koreografeye-mastodon/node_modules/@digitalbazaar/http-client/index.js:8:18)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)

Not attaching the componentsjs-error-state.json because I couldn't really make sense of it/scan it for PII, but can submit that if that would be helpful.

Noticed that that repo pins an old version of the package so i tried updating it to ^0.4.0 as in this one, but that just nuked the error messages and printed out the entire contents of some minified module when I ran it, but gave the same error at the bottom.

It sort of looks like that error is being thrown on the mere import of the @digitalbazaar/http-client which is a dep of the jsonld package:

>>> npm explain @digitalbazaar/http-client
@digitalbazaar/[email protected]
node_modules/@digitalbazaar/http-client
  @digitalbazaar/http-client@"^1.1.0" from [email protected]
  node_modules/jsonld
    jsonld@"^5.x.x" from [email protected]
    node_modules/koreografeye
      koreografeye@"^0.4.0" from the root project
      koreografeye@"^0.4.0" from [email protected]
      node_modules/koreografeye-mastodon
        koreografeye-mastodon@"^1.1.1" from the root project

Can't find the apply call it's referring to tho.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.