react-native
react-native copied to clipboard
Unable to resolve module react/jsx-runtime in low version of React
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:
-
git clone https://github.com/lee1409/storybook-low-react
-
npm install
- Run
expo start --ios
- 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"));