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

Bug: buildPath returning incorrect path #81

Closed
alexkreidler opened this issue Dec 14, 2020 · 2 comments · Fixed by #80
Closed

Bug: buildPath returning incorrect path #81

alexkreidler opened this issue Dec 14, 2020 · 2 comments · Fixed by #80

Comments

@alexkreidler
Copy link

ontology_debug

buildPath is returning node_modules/@zazuko/ontologies instead of the correct node_modules/@zazuko/rdf-vocabularies/ontologies.

Additionally, the vocabularies() function should properly throw an error if it reads files in the wrong location.

Thanks for this tool!

@alexkreidler
Copy link
Author

I patched the code by replacing

path_1.join(__dirname, '../../ontologies', \`${prefix}.nq\`)
// with
path_1.join(__dirname, '../ontologies', `${prefix}.nq`)

patch

See that dataset returns proper data, whereas before it returned an empty object.
after_patch

I don't know if this is new bug in a new release or there are some other mitigating factors that might be why I am specifically getting this bug.

@tpluscode
Copy link
Contributor

Thank you @alexkreidler, I noticed that too. TL;DR; the paths are different in dev (./src) than in the built package. You'll see that I started #80 but it's not done yet.

For the time being you might instead import from @zazuko/rdf-vocabularies/datasets or @zazuko/rdf-vocabularies/datasets/prefix

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

Successfully merging a pull request may close this issue.

2 participants