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

"fs module not found" when using geotiff in React via custom package #452

Open
Daim-Nickel-Penny opened this issue Jan 14, 2025 · 0 comments

Comments

@Daim-Nickel-Penny
Copy link

I'm using the "geotiff": "^2.1.3" package as a dependency in my custom NPM package. When I build and use this custom package in a React project, I run into the error: fs module not found.

The troubleshoots i tried were -

  • in the package.json added below code (Didn't work)
"browser": {
   "fs": false,
   "http": false,
   "https": false
 }
  • Since I use babel inside my custom package, I added in my babel.config.js
    [ 'babel-plugin-transform-inline-environment-variables', { include: ['fs'] } ]
    this didn't work either

my question is:

  • Does the geotiff package have a browser-compatible build?
  • If not, what's the recommended approach to fix the fs issue ?
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

1 participant