Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

Seeing "TypeError: Cannot read property 'Term' of undefined" from sparql.js when running tests. #94

Open
pmcb55 opened this issue Jul 3, 2020 · 3 comments

Comments

@pmcb55
Copy link
Contributor

pmcb55 commented Jul 3, 2020

Seems very easy to reproduce - simply checkout the branch feat/use-lit-vocab-term, run npm install && npm test, i.e.:

git clone -b feat/use-lit-vocab-term git@github.com:inrupt/solid-sdk-forms.git
cd solid-sdk-forms
npm install
npm test

...and I see...

[solid-sdk-forms]$ npm test
> @inrupt/solid-sdk-forms@0.2.0 test /home/pmcb55/tmp/solid-sdk-forms
> jest --coverage
 PASS  test/shex-form-model.test.ts
 FAIL  test/solid-fetch.test.ts
  ● Test suite failed to run
    TypeError: Cannot read property 'Term' of undefined
      at Object.<anonymous> (node_modules/sparqljs/lib/Wildcard.js:1:46)
      at node_modules/sparqljs/lib/SparqlParser.js:694:18
      at Object.<anonymous> (node_modules/sparqljs/lib/SparqlParser.js:1538:3)
 FAIL  test/form-ui.test.ts
  ● Test suite failed to run
    TypeError: Cannot read property 'Term' of undefined
      at Object.<anonymous> (node_modules/sparqljs/lib/Wildcard.js:1:46)
      at node_modules/sparqljs/lib/SparqlParser.js:694:18
      at Object.<anonymous> (node_modules/sparqljs/lib/SparqlParser.js:1538:3)
 FAIL  test/form-model.test.ts
  ● Test suite failed to run
    TypeError: Cannot read property 'Term' of undefined
      at Object.<anonymous> (node_modules/sparqljs/lib/Wildcard.js:1:46)
      at node_modules/sparqljs/lib/SparqlParser.js:694:18
      at Object.<anonymous> (node_modules/sparqljs/lib/SparqlParser.js:1538:3)

I updated the package.json to all the latest versions (I think), including TypeScript and TypeDoc, so I've no idea what's going on here.

@RubenVerborgh
Copy link

@joachimvh This seems to be in your part of the code 😉

@RubenVerborgh
Copy link

@pmcb55 It was found by @joachimvh that this is due to the N3.js version; SPARQL.js is accessing internals that it shouldn't. Will fix there.

@RubenVerborgh RubenVerborgh removed their assignment Jul 3, 2020
@RubenVerborgh
Copy link

Fixed in sparqljs@3.0.2.

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

No branches or pull requests

2 participants