-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Rollup build produces a runtime error #109
Comments
After more debugging I found that the issue is caused by a check within the
More specifically, the first operand ( The error disappeared after I manually changed this check in the following files:
Unfortunately I cannot persist these changes with |
Hey! Just wanted to let you know I'm reading this. I really appreciate the time you've taken diving into the details. I'm overloaded with work and family events the next few days, but should have time next week to review. Thank you! It's really impressive you were able to dig through the libraries so quickly! |
Hi @DanielJDufour, did you have a chance to review the PR (DanielJDufour/proj4-fully-loaded#3) by any chance? I wrote an explanation there of why that PR does not have any negative side effects, i.e. there is no situation where the PR's behaviour would cause an error and the existing code would not, so it should be safe to merge. |
I am also waiting for this fix and wondered if you had any news @luka-mikec @DanielJDufour :) |
@wrengames It seems Daniel is busy :), but I found out that recent versions of
|
you're awesome @luka-mikec ! sorry for the late reply. I'll take a deep look when I metaphorically come up for air. In the meantime, would it be possible to add a test that captures this rollup issue to https://github.com/GeoTIFF/georaster-layer-for-leaflet/tree/master/tests similar to https://github.com/GeoTIFF/georaster-layer-for-leaflet/tree/master/tests/vue. It'll make accepting and testing faster (and making sure no regressions happen in the future). thank you!! |
Thanks for this @luka-mikec ! You have saved me a load of work finding a replacement for the georaster plugin. Thanks also to @DanielJDufour for making the plug-in on the first place 😊 |
I updated the dependencies with the fix, but I'm in the middle of another update, so I'm going to combine the work and try to get a new version published later this week. (I'll save time that way) I created a new repo: https://github.com/GeoTIFF/georaster-layer-for-leaflet-vite and invited you both as maintainers. We can use it to test the new version of georaster-layer-for-leaflet once it is released. |
@wrengames np! @DanielJDufour thanks! The version 0.2.0 doesn't cause an issue: GeoTIFF/georaster-layer-for-leaflet-vite#1 Regarding tests, I can add it there, did you mean to add just the basic example without workarounds (the one that will work once the new version propagates everywhere)? |
Geoblaze also needs the dependency updated for my usage please. Although I can put an override to this new version in my app 😊 |
Had the same problem - Updating the dependency to 0.2.0 via the overrides option also solved it for me. Thank you @luka-mikec! Would love to see this fixed asap, took me some hours to figure out :D |
Describe the bug
When building an NPM project using Vite/Rollup, an error is produced during runtime (something like
xyz.defs is not a function
with a random string in place ofxyz
).Edit: turned off minification to see what the xyz is:
proj4$1.defs(defs);
To Reproduce
Steps to reproduce the behavior:
npm init vite
, and name it e.g.georaster-layer-for-leaflet-example
cd georaster-layer-for-leaflet-example
npm install georaster-layer-for-leaflet
main.js
add:import 'georaster-layer-for-leaflet'
npm run build && npm run preview
http://localhost:4173/
in a browser; an error will be thrown in the console.Expected behavior
No error should appear in the console.
The text was updated successfully, but these errors were encountered: