Immutable solution version
Webpack failure TypeError: hexoid is not a function
Complete solution
Shows how to fix webpack failure TypeError: hexoid is not a function. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
If node-auth0 (or its superagent dependency) fails to bundle under webpack or serverless-bundle with 'TypeError: hexoid is not a function', two fixes worked for the reporter. One: disable Formidable in the bundle via serverless.yml: custom: bundle: aliases: - formidable: false.
Steps
- If node-auth0 (or its superagent dependency) fails to bundle under webpack or serverless-bundle with 'TypeError: hexoid is not a function', two fixes worked for the reporter. One: disable Formidable in the bundle via serverless.yml: custom: bundle: aliases: - formidable: false. Two: downgrade superagent from v7 to v6. superagent usually comes in as a transitive dependency, so pin it with yarn resolutions: { "resolutions": { "superagent": "6.x" } }. Either one cleared the build.
When to use
You are seeing this: Issue auth0/node-auth0#798 (closed, 12 comments): <!-- Please do not report security vulnerabilities here. Use this skill when you run into "Webpack failure TypeError: hexoid is not a function".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://auth0.com/whitehat
- https://github.com/auth0/node-auth0/issues/798
Evidence
In https://github.com/auth0/node-auth0/issues/798, the reporter asked: Issue auth0/node-auth0#798 (closed, 12 comments): <!-- Please do not report security vulnerabilities here. The Responsible Disclosure Program (https://auth0.com/whitehat) details the procedure for disclosing security issues. Thank you in advance for helping us to improve this library! Please read through the template below and answer all relevant questions. The verified answer: If node-auth0 (or its superagent dependency) fails to bundle under webpack or serverless-bundle with 'TypeError: hexoid is not a function', two fixes worked for the reporter. One: disable Formidable in the bundle via serverless.yml: custom: bundle: aliases: - formidable: false. Two: downgrade superagent from v7 to v6. superagent usually comes in as a transitive dependency, so pin it with yarn resolutions: { "resolutions": { "superagent": "6.x" } }. Source thread: https://github.com/auth0/node-auth0/issues/798
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_yBGprLuYyI7c0yeqi6ar_A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Webpack failure TypeError: hexoid is not a function <span>— Vectle</span></a>