esm.sh
esm.sh copied to clipboard
Static CJS exports not detected - @nodefill/primordials
Failing module
- GitHub: https://github.com/nodefill/primordials
- npm: https://npmjs.com/package/@nodefill/primordials
import { ArrayPrototypePush } from "https://esm.sh/@nodefill/primordials"
Error message
After onload I got this:
Uncaught SyntaxError: The requested module 'https://esm.sh/@nodefill/primordials' does not provide an export named 'ArrayPrototypePush' (at data:text/javascript,import { ArrayPrototypePush } from "https://esm.sh/@nodefill/primordials":1:10)
Additional info
- esm.sh version: v128
- Browser version: Chrome 114
Node.js Deno detect the named exports just fine:

also posted to https://github.com/jsdelivr/jsdelivr/issues/18512
https://github.com/nodefill/primordials/releases/tag/v3.1.0 I made it work with esm.sh by manually duplicating the export names so that it got picked up by the CJS lexer. However, this still doesn't recognize eval which should work...
// SYNTAX ERROR: doesn't provide "eval" as named export
import { eval as eval2 } from "https://esm.sh/@nodefill/primordials"
// works in Node.js
import { eval as eval2 } from "@nodefill/primordials"
v130 should fix
Almost. The named eval export still fails.