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

Had to explictly install d3 #78

Open
apoorv-kumar opened this issue Jul 16, 2017 · 9 comments
Open

Had to explictly install d3 #78

apoorv-kumar opened this issue Jul 16, 2017 · 9 comments
Assignees
Labels

Comments

@apoorv-kumar
Copy link

apoorv-kumar commented Jul 16, 2017

For some reason npm install didn't automatically install d3 and I was getting the following error -

ERROR in ./ ~ /react-vis/dist/plot/axis/decorative-axis.js
Module not found: Error: Cannot resolve module 'd3-format' in ${WORKING_DIR}/story-generator/node_modules/react-vis/dist/plot/axis
@ ./ ~ /react-vis/dist/plot/axis/decorative-axis.js 15:16-36

ERROR in ./ ~ /react-vis/dist/radar-chart/index.js
Module not found: Error: Cannot resolve module 'd3-format' in ${WORKING_DIR}/story-generator/node_modules/react-vis/dist/radar-chart
@ ./ ~ /react-vis/dist/radar-chart/index.js 39:16-36

I did npm install d3 and then npm start -s works.

@tejasrivastav
Copy link
Contributor

@apoorv-kumar d3 isnt added as dependency in the package.json.

@apoorv-kumar
Copy link
Author

@tejasrivastav It should be added right ? The project doesn't seem to work otherwise.

@imakshayverma
Copy link
Member

@tejasrivastav @apoorv-kumar True, D3 isnt added as dependency in the package.json but has been added explicitly to support topojson to convert topojson data to geojson. I was having issues in installation and importing of the modules, so I included in explicitly. There arn't any other dependency for d3. The visualization are built using react-vis and vanilla js. React-vis uses d3 built for that it doesn't need to be included additionally.

@tejasrivastav
Copy link
Contributor

@akshay2905 d3 isnt added as dep in react-viz repo correct if im referring to same

@imakshayverma
Copy link
Member

@tejasrivastav it is actually. It is based on React and d3. Sharing the package.json file for react-vis - Link

They have included invidual components of the d3 library to serve different purposes

@apoorv-kumar
Copy link
Author

apoorv-kumar commented Jul 17, 2017

@akshay2905 I see. It might be useful to include this additional step in the installation documentation. I'm new to the scene so it wasn't obvious to me. Happy to raise a PR for it.

@imakshayverma
Copy link
Member

@apoorv-kumar We might need to probably diagnose the issue here. As it is not a reported as common issue by others. Managing packages with npm can be a little tricky at times. There might be other issue at play. At what stage did you face this problem?

@apoorv-kumar
Copy link
Author

During my first npm start -s, I got the error I shared above. It might be that typically people have d3 installed in the global npm libs and I didn't.

@imakshayverma
Copy link
Member

@apoorv-kumar Possible. Will check with a few others if the same problem exist.

@Abhi2102 Abhi2102 self-assigned this Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants