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

Build error when import "ol/source/GeoTIFF" #43

Open
rendrom opened this issue Dec 1, 2021 · 1 comment
Open

Build error when import "ol/source/GeoTIFF" #43

rendrom opened this issue Dec 1, 2021 · 1 comment

Comments

@rendrom
Copy link

rendrom commented Dec 1, 2021

Hello!

Faced with the problem that when importing a component from "ol/source/GeoTIFF", it is not possible to build.

(!) Missing shims for Node.js built-ins
Creating a browser bundle that depends on "http", "https", "url", "events", "os", "path", "tty"and "util". You might need to include https://github.com/snowpackjs/rollup-plugin-polyfill-node
(!) Missing global variable names
Use output.globals to specify browser global variable names corresponding to external modules
http (guessing 'http')
https (guessing 'https')
url (guessing 'require$$4')
events (guessing 'require$$1$2')
os (guessing 'require$$2')
path (guessing 'require$$0')
child_process (guessing 'require$$1$1')
tty (guessing 'require$$0$1')
util (guessing 'require$$1$3')
(!) Use of eval is strongly discouraged
...

I made a fork with a demonstration of this error:

https://github.com/rendrom/ol-rollup

Run on codesandbox:

https://githubbox.com/rendrom/ol-rollup

For example, the code from the official examples was used:

https://openlayers.org/en/latest/examples/cog.html

To build openlayers legacy, webpack is used with the following settings:

https://github.com/openlayers/openlayers/blob/main/config/webpack-config-legacy-build.mjs#L30-L34

Please advise how to fix the config for building openlayers in rollup with a "ol/source/GeoTIFF" module

@mradamcox
Copy link

I have this exact same issue. Did you ever figure out how to handle it?

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