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
Description:
After upgrading to Deno 1.41.0 from 1.40.x, I encountered an issue concerning the resolution of the package subpath './jsx-runtime' for React 18.2.0. This issue wasn't present in the previous version of Deno.
Error Message:
When attempting to use import { jsx as _jsx } from "npm:react@18.2/jsx-runtime"; the following error is encountered:
error: Uncaught Error: Failed resolving package subpath './jsx-runtime' for '/Users/Library/Caches/deno/npm/registry.npmjs.org/react/18.2.0/package.json': [ERR_PACKAGE_PATH_NOT_EXPORTED] Package subpath './jsx-runtime' is not defined for types by "exports" in '/Users/Library/Caches/deno/npm/registry.npmjs.org/react/18.2.0/package.json'
This issue seemingly arises from the JSX commonjs detection code within Deno, as React (as of version 18.2.0) does not yet support esm.
Steps to Reproduce:
Upgrade Deno from version 1.40.x to 1.41.0.
Attempt to import jsx from React's jsx-runtime using the specified syntax above.
deno publish
Observe the error regarding the failed resolution of package subpath './jsx-runtime'.
Expected Behavior:
The package subpath './jsx-runtime' should be resolved without errors, allowing for the successful import and usage of React's JSX runtime in Deno.
Actual Behavior:
The import fails due to an uncaught error regarding the resolution of the package subpath './jsx-runtime'.
I suspect there might be a bug in Deno's JSX commonjs detection code affecting compatibility with React's current lack of esm support. Would appreciate any insights or assistance in resolving this issue. Thank you!
The text was updated successfully, but these errors were encountered:
nestarz
changed the title
React/jsx-runtime subpath './jsx-runtime' not resolved in Deno 1.41.0
React/jsx-runtime subpath './jsx-runtime' not resolved for types in Deno 1.41.0
Feb 22, 2024
Environment:
Description:
After upgrading to Deno 1.41.0 from 1.40.x, I encountered an issue concerning the resolution of the package subpath './jsx-runtime' for React 18.2.0. This issue wasn't present in the previous version of Deno.
Error Message:
When attempting to use
import { jsx as _jsx } from "npm:react@18.2/jsx-runtime";
the following error is encountered:This issue seemingly arises from the JSX commonjs detection code within Deno, as React (as of version 18.2.0) does not yet support esm.
Steps to Reproduce:
Expected Behavior:
The package subpath './jsx-runtime' should be resolved without errors, allowing for the successful import and usage of React's JSX runtime in Deno.
Actual Behavior:
The import fails due to an uncaught error regarding the resolution of the package subpath './jsx-runtime'.
I suspect there might be a bug in Deno's JSX commonjs detection code affecting compatibility with React's current lack of esm support. Would appreciate any insights or assistance in resolving this issue. Thank you!
The text was updated successfully, but these errors were encountered: