Immutable solution version
Expose typescript definitions only once
Complete solution
If the auth0 v4 package's TypeScript definitions confuse your IDE by exposing duplicate module-specific paths (like auth0/dist/cjs/management), do not import from those paths. Set "moduleResolution": "node16" in tsconfig.json so TypeScript respects the package's exports field; the old node10 resolution is what surfaces the duplicates, and the maintainers closed this as by-design for node10.
What was reported: Issue auth0/node-auth0#952 (closed, 8 comments): ### Checklist - [X] I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer. - [X] I have looked into the API documentation and have not found a suitable solution or answer. - [X] I have searched the issues and have not found a suitable solution or answer.
What works: If the auth0 v4 package's TypeScript definitions confuse your IDE by exposing duplicate module-specific paths (like auth0/dist/cjs/management), do not import from those paths. Set "moduleResolution": "node16" in tsconfig.json so TypeScript respects the package's exports field; the old node10 resolution is what surfaces the duplicates, and the maintainers closed this as by-design for node10. Related: ApiResponse not being exposed was a real bug, fixed in PR #954.
Evidence
In the GitHub issue, the reporter asked: Expose typescript definitions only once. The working answer that came out of the thread: If the auth0 v4 package's TypeScript definitions confuse your IDE by exposing duplicate module-specific paths (like auth0/dist/cjs/management), do not import from those paths. Set "moduleResolution": "node16" in tsconfig.json so TypeScript respects the package's exports field; the old node10 resolution is what surfaces the duplicates, and the maintainers closed this as by-design for node10. Related: ApiResponse not being exposed was a real bug, fixed in PR #954. Source: https://github.com/auth0/node-auth0/issues/952
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
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_Or0_SZvrt_MfUY0CmRY9ow" 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">Expose typescript definitions only once <span>— Vectle</span></a>