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

d3 is not defined #134

Open
AleksandarCila opened this issue Jul 14, 2022 · 4 comments
Open

d3 is not defined #134

AleksandarCila opened this issue Jul 14, 2022 · 4 comments

Comments

@AleksandarCila
Copy link

Hi @ofrohn ,

I have installed d3-celestial with npm i d3-celestial. I am using React. Imported everything in my component, but whatever I tried I get the same error:
d3 is not defined.

It shows on celestial.js , row 1006:
var d3js = require('./lib/d3.js'),
d3_geo_projection = require('./lib/d3.geo.projection.js');

and later in d3.geo.projection.js wherever you use d3, for an example row 2:
d3.geo.project = function(object, projection) {

VSCode says, on require('./lib/d3.js'):
Could not find a declaration file for module './lib/d3.js' . [path_name] implicitly has an 'any' type.

I am not that experienced with those things, but what could be the problem of this?

Let me know if I need to share any additional info and thanks a lot for any kind of feedback!

@johnvanhulsen
Copy link

@AleksandarCila did you fixed it? I've got the same error from Svelte...

@FilipLjubic
Copy link

yep, same. If you guys get any updates on this please let me know

@johnvanhulsen
Copy link

@FilipLjubic I've used this fork: https://github.com/ownego/d3-celestial that fixed a lot of issues.
I've build it local and load it into my HTML like this;

<script src="/src/d3.js"></script>
<script src="/src/d3.geo.projection.js"></script>
<script src="/src/celestial.js"></script>

@FilipLjubic
Copy link

thanks very much, I'll give it a try and let you know how it goes!

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

3 participants