-
-
Notifications
You must be signed in to change notification settings - Fork 683
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
Invalid invocation of hexoid
in [email protected]
#871
Comments
Heya. @mwaibel-go Yea, probably, that's why a massive ESM wave came last few years while I was absent. Finally we can write standard things and compile to whatever we what, properly. I think we should support non-ESM (CJS) in v3, that's probably I'm holding moving
Yea, that's an easy fix, I can patch it as |
Thank you for your response. I’ve looked into it, but on the v2-latest branch the test suite fails with a fresh clone. Applying the intended fix fails some 14 test cases more. As I said, modules are really not my area of expertise, and currently I don’t have the time to read into that and another codebase to get the tests to work again. I’m sorry for that. |
For anyone coming to this with failures building using webpack or other build systems that use webpack under the hood, these threads have some successful fixes: #337 (comment) (node, nextjs) Haven't looking into it, but "webpack5 uses hexoid/dist/index.mjs by default while formidable uses it as a CommonJS module", as quoted by the second link's post author, seems correct. |
Support plan
Context
What are you trying to achieve or the steps to reproduce?
I’m compiling a test suite with webpack. The tests require supertest, which through its dependency superagent relies on [email protected].
The offending lines are lines 8 and 15 in Formidable.js,
You appear to be relying on hexoid’s behaviour prior to this commit in which the export mechanism was changed.[Edit: It turns out I jumped to conclusions there, as the change in that repository was not published. I’m thinking this issue might actually be related to the switch to ES modules merged in 70517da (release 3.0.0), but JS modules are beyond me.]
Changing the import in line 8 to
fixes the error for me.
Unfortunately, the author of that library didn’t bump their version after the breaking change. I suggest you either released the fix I suggested above (if @^2.0.0 is still supported), or you pinned the exact git commit in your dependencies.What was the result you got?
When I try to compile my tests using webpack, the compiler throws this Error:
($PROJECT_DIR and $PROJECT_NAME are replacements of my actual file path and project name.)
What result did you expect?
No compile-time error.
Thank you for your time.
The text was updated successfully, but these errors were encountered: