ES modules fail to be imported during node.js dynamic analysis · Issue #982 · ossf/package-analysis · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Around 2k NPM packages per day fail to be analyzed properly due to import errors:
The error messages are in 2 forms, for example:
Failed to import @versini/ui-components: Error [ERR_REQUIRE_ESM]: require() of ES Module /app/node_modules/@versini/ui-components/dist/index.js from /usr/local/bin/analyze-node.js not supported.
Failed to import isolate-package: Error [ERR_REQUIRE_ESM]: require() of ES Module /app/node_modules/isolate-package/dist/index.mjs not supported.
(the difference is that the first variant specifies from /usr/local/bin/analyze-node.js, and usually occurs when attempting to import an index.js file; the second variant is when importing .mjs files)