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

Can't resolve fs with webpack #51

Closed
DanielJDufour opened this issue Jun 22, 2018 · 2 comments
Closed

Can't resolve fs with webpack #51

DanielJDufour opened this issue Jun 22, 2018 · 2 comments

Comments

@DanielJDufour
Copy link
Contributor

I'm running into the following error when I'm trying to use geotiff.js with webpack. I created a minimal demo that shows the error when you run npm run dev or npm run build and can be found here: https://github.com/DanielJDufour/geotiff-test-webpack. I might be doing something wrong... Thank you!

image

@constantinius
Copy link
Member

Hi @DanielJDufour

This is due to some missing webpack configuration values. Basically you have to tell webpack that some modules are to be excluded as they are only available in the node.js standard library and don't make much sense outside. These modules have to be manually marked 'empty'.

Please have a look at the webpack config used for the geotiff.js bundle.

I know it is not very elegant, but I could not find a better solution.

Please let me know if this fixes your issue.

@DanielJDufour
Copy link
Contributor Author

@constantinius , that fixes the problem. Thanks!

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

2 participants