-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
require of a missing iterator.js file breaks builds #780
Comments
Related issue: facebook/react#19756 Looks like something coming from babel. |
I'm not sure why it's happening but I also wonder why your bundler is picking up the compiled file instead of https://unpkg.com/browse/vega-embed@6.20.0/build/vega-embed.module.js. Do you have any ideas about these two questions? |
No idea on why, but the bundler certainly has options to pick the ESM version. Just wanted to give a heads up that the UMD release is broken. |
Thanks for the heads up. Hopefully, that doesn't affect too many people since the ESM version is what bundlers should use and the bundles are more intended for direct use in browsers. |
We're affected by this. We get the following error in the build pipline
Do you know how to fix this? |
Ahh, shoot. So the module file also has the broken import now. |
It's coming from https://github.com/isaacs/yallist/blob/1649cc57394b5affeca2c573943ebe3ed7d39119/yallist.js#L425, not babel. The issue is isaacs/yallist#22. |
It was introduced to the module build in https://unpkg.com/browse/vega-embed@6.20.1--canary.790.70fb595.0/build/vega-embed.module.js. But what changed between that and the previous canary (or between 6.20.0 and 6.20.1)… |
Maybe it was the fix for #767. |
Rollup doesn't seem to handle the require inside the try-catch: rollup/plugins#496 |
That would match the version, but difficult to see the connection. Yallist has been unchanged in yarn.lock since November last year, and is pulled as dependency of lru-cache which has been locked since December, and finally that is a dependency of semver which has been locked since March. So I guess that the different way of importing is changing how the build tools behave. |
I had to change the import for semver to work with the new versions of rollup. I guess something about the bundling process changed but it would be hard to track it down. I think the solution is to either fix yallist to not use a require inside a try-catch or fix rollup. Alternatively, we could try to switch to esbuild (#634) and see whether that fixes it. Either way, I have to stop here and defer to rollup or yallist as the cause of this issue. |
This issues is also affecting us:
|
I'm also seeing it in vega editor now. We should find a way to fix it. I'd appreciate any help/suggestions/ideas. |
This ./iterator.js file is from the yallist library on the https://github.com/isaacs/yallist/blob/master/package.json#L11 line. The dependency of this yallist library follows the tree: Maybe there is a problem with the build of package. |
🚀 Issue was released in |
@aju @fcollonval any ideas for how we can solve this error here ? |
Hmm, maybe bundledDependencies works. |
Closing for now. |
https://unpkg.com/browse/vega-embed@6.20.0/build/vega-embed.js has a line
require('./iterator.js')(Yallist$1);
which breaks some build systems due to that file missing from the package https://unpkg.com/browse/vega-embed@6.20.0/build/.In the previous version (https://unpkg.com/browse/vega-embed@6.19.1/build/vega-embed.js) the iterator wasn't created with a require, but as an inlined function. There's no reference to iterator in the source code, however, so I suppose this comes from some other package, or the packaging tool?
The text was updated successfully, but these errors were encountered: