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
package.json is misconfigured regarding esm/cjs exports, resulting in the .esm.js file being loaded as a commonjs module and failing in nodejs environment.
import this module in a server-side rendering environment results in the following error:
/.../node_modules/@primer/octicons-react/dist/index.esm.js:1
import React from 'react';
^^^^^^
SyntaxError: Cannot use import statement outside a module
Expected behavior
package.json should either:
have a "type": "commonjs" attribute and export the ES module as .mjs
have a "type": "module" attribute and export the commonjs as .cjs
The text was updated successfully, but these errors were encountered:
Describe the bug
package.json
is misconfigured regardingesm/cjs
exports, resulting in the.esm.js
file being loaded as a commonjs module and failing in nodejs environment.https://publint.dev/@primer/octicons-react@19.8.0
Steps to reproduce
import this module in a server-side rendering environment results in the following error:
Expected behavior
package.json
should either:"type": "commonjs"
attribute and export the ES module as.mjs
"type": "module"
attribute and export the commonjs as.cjs
The text was updated successfully, but these errors were encountered: