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

Module "delaunator" not found. Only listed as devDependency. #35

Closed
tannerlinsley opened this issue Apr 9, 2018 · 5 comments
Closed

Comments

@tannerlinsley
Copy link
Contributor

Not sure if this is intended, but it looks like "delaunator" might need to be added as a production dependency to not get this error.

@mourner
Copy link
Contributor

mourner commented Apr 9, 2018

This is intended, because delaunator gets inlined for the release as a build step. https://github.com/d3/d3-delaunay/blob/master/package.json#L36

@mourner mourner closed this as completed Apr 9, 2018
@tannerlinsley
Copy link
Contributor Author

tannerlinsley commented Apr 9, 2018 via email

@tannerlinsley
Copy link
Contributor Author

I think what's happening is that since the package.json module definition points to the source, it is hitting the import delaunator from 'delaunator', and throwing this error. I wonder, should the the module definition be removed, point to a dist, or the dependency moved to production?

@mourner mourner reopened this Apr 9, 2018
@mourner
Copy link
Contributor

mourner commented Apr 9, 2018

Oh, you're right. I forgot about the module entry point. We should move the dependency to production then.

tannerlinsley added a commit to tannerlinsley/d3-delaunay that referenced this issue Apr 9, 2018
@mbostock
Copy link
Member

mbostock commented Apr 9, 2018

I think my eventual plan is for the module entry point to point to a minified Rollup ES module, so that when you load d3-delaunay from unpkg it only triggers a single request. But adding this as a production dependency for now would be fine. 👍

mourner pushed a commit that referenced this issue Apr 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants