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

jsx-runtime not found error in downstream vitest project #19

Closed
hi-ogawa opened this issue Mar 13, 2023 · 1 comment · Fixed by #20
Closed

jsx-runtime not found error in downstream vitest project #19

hi-ogawa opened this issue Mar 13, 2023 · 1 comment · Fixed by #20

Comments

@hi-ogawa
Copy link
Owner

hi-ogawa commented Mar 13, 2023

The issue is found in:

Currently we use "jsx": "react-jsx" for @hiogawa/utils-react package.
React version (ytsub-v3 uses react 17) might be relevant.


logs

https://github.com/hi-ogawa/ytsub-v3/actions/runs/4401061028/jobs/7706928767#step:7:66

 FAIL  app/routes/__tests__/videos-id.test.ts [ app/routes/__tests__/videos-id.test.ts ]
Error: Cannot find module '/home/runner/work/ytsub-v3/ytsub-v3/node_modules/.pnpm/@hiogawa+utils-react@1.1.0_react@17.0.2/node_modules/react/jsx-runtime' imported from /home/runner/work/ytsub-v3/ytsub-v3/node_modules/.pnpm/@hiogawa+utils-react@1.1.0_react@17.0.2/node_modules/@hiogawa/utils-react/dist/index.js
Did you mean to import react@17.0.2/node_modules/react/jsx-runtime.js?
@hi-ogawa hi-ogawa changed the title jsx-runtime not found error in vitest jsx-runtime not found error in downstream vitest project Mar 13, 2023
@hi-ogawa
Copy link
Owner Author

hi-ogawa commented Mar 13, 2023

It seems manually modifying utils-react/dist/index.js would fix it:

import { jsx, jsxs } from "react/jsx-runtime.js";    ///// <= originally  "react/jsx-runtime"
function Debug(props) {
  ...
}

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

Successfully merging a pull request may close this issue.

1 participant