Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to resolve module react/jsx-runtime in low version of React #537

Open
lee1409 opened this issue Jan 16, 2024 · 0 comments
Open

Unable to resolve module react/jsx-runtime in low version of React #537

lee1409 opened this issue Jan 16, 2024 · 0 comments

Comments

@lee1409
Copy link

lee1409 commented Jan 16, 2024

Describe the bug
I encounter react/jsx-runtime not found error when using the React version that doesn't support react/jsx-runtime. Is it possible to fix the issue by changing the compilerOptions.jsx from react-jsx to react/react-native?

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/lee1409/storybook-low-react
  2. npm install
  3. Run expo start --ios
  4. Open the expo go

Expected behavior
No error and bundle successful

Screenshots

iOS Bundling failed 2761ms
Unable to resolve module react/jsx-runtime from .../expo-app/my-app/node_modules/@storybook/addon-ondevice-actions/dist/index.js: react/jsx-runtime could not be found within the project.

If you are sure the module exists, try these steps:
 1. Clear watchman watches: watchman watch-del-all
 2. Delete node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-*
   5 | Object.defineProperty(exports, "__esModule", { value: true });
   6 | exports.register = void 0;
>  7 | const jsx_runtime_1 = require("react/jsx-runtime");
     |                                ^
   8 | const addons_1 = __importDefault(require("@storybook/addons"));
   9 | const addon_actions_1 = require("@storybook/addon-actions");
  10 | const ActionLogger_1 = __importDefault(require("./containers/ActionLogger"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant