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

Cannot find namespace '$rdf' #13

Closed
tiagosomda opened this issue Oct 21, 2018 · 6 comments
Closed

Cannot find namespace '$rdf' #13

tiagosomda opened this issue Oct 21, 2018 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@tiagosomda
Copy link
Contributor

I went through the steps described on the readme.md and when I ran 'ng serve'

I was getting the following errors:

ERROR in src/app/services/rdf.service.ts(33,12): error TS2503: Cannot find namespace '$rdf'.
src/app/services/rdf.service.ts(41,18): error TS2503: Cannot find namespace '$rdf'.
src/app/services/rdf.service.ts(323,58): error TS2503: Cannot find namespace '$rdf'.

I checked the file src/app/services/rdf.service.ts
and the following line was commented out:
import * as $rdf from 'rdflib'

I uncommented it and the project built and I was able to load the page.

@james-martin-jd - is there a reason why that line needed to commented out?
I saw that you recently commented it out to fix an "issue where rdflib was throwing errors"
1c91ae7#diff-dca975bf5ad72321f0990d8416fddab0

@tiagosomda
Copy link
Contributor Author

Created a pull request (#14) if you think we should uncomment it

@james-martin-jd
Copy link
Contributor

That's interesting, I was getting the opposite issue where I was unable to import rdflib using this method. This was changed in a PR, where we were just declaring the variable and including it in the index.html, so I reverted back to that method to prevent the errors, which worked locally. I'll investigate.

@james-martin-jd james-martin-jd self-assigned this Oct 22, 2018
@james-martin-jd james-martin-jd added the bug Something isn't working label Oct 22, 2018
@tiagosomda
Copy link
Contributor Author

Do you need some info from my machine/environment to help debug that?

@james-martin-jd
Copy link
Contributor

Thanks for the offer! I'm checking into it right now - I doubt it's specific to an OS at the moment. I wonder if it's something locally on my dev machine that's configured weird. Like an extra package declaration or something.

@james-martin-jd
Copy link
Contributor

james-martin-jd commented Oct 25, 2018

To follow up on this, I opened an issue on rdflib github to fix imports. When I use the import instead of <script> and declare, I get errors related to a missing package dependency, so I think this is something that needs to be fixed. Once that gets addressed I'll change everything to import, as that's the preferred way of adding files.

To be clear, it builds fine with import, but at runtime if you try to change a profile field, it fails.

@james-martin-jd
Copy link
Contributor

Fixed in 0.1.6 release

@ghost ghost removed the in progress label Oct 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants