-
Notifications
You must be signed in to change notification settings - Fork 36
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
React is not defined: auto jsx runtime #58
Comments
Thanks, could you please test it with |
I will thanks! |
@FezVrasta That doesn't work for me, I get |
Could you please try |
@samueljseay may you please provide some feedback? |
@FezVrasta it seems that v3.1.2 breaks applications using the old JSX transform. I'm getting the error |
PRs are more than welcome 🙏 |
I believe it has something to do with setting |
v3.1.2 introduces a `ReferenceError: jsx is not defined` error due to wrong configuration (see [issue](FezVrasta/react-resize-aware#58)). We therefore pin the version for the time being.
I'm sorry, we decided to use ResizeObserver instead. 🙃 |
3.1.2 borked our entire app with |
We also got the |
@timothyallan whats the issue with just sticking with 3.1.1? If you look at the releases, there are no functional changes that you need. |
Primarily because 3.1.2 is a bigger number than 3.1.1, therefore it must be better, and I want my package.json to have the biggest numbers in town for everything. |
3.1.1 does not support React 18 (see #59) |
Still getting this as of feb 2022 |
This seems to be an issue still. 3.1.1 resolves this, but this is coming up deep in a dependency tree from some other packages we're using, and 3.1.2 is being installed by default, which makes it fail. I've manually installed 3.1.1 to override the one from the package we're using. I lost sooooo many hours trying to diagnose what was happening here. |
3.1.2 seems to have a broken build that references jsx without importing react: FezVrasta/react-resize-aware#58
## Summary 3.1.2 seems to have a broken build that references jsx without importing react: FezVrasta/react-resize-aware#58 Pinning to the current version in the lockfile so there's no room for deviation in Reflame deploys. <!-- Ideally, there is an attached GitHub issue that will describe the "why". If relevant, use this section to call out any additional information you'd like to _highlight_ to the reviewer. --> ## How did you test this change? <!-- Frontend - Leave a screencast or a screenshot to visually describe the changes. --> ## Are there any deployment considerations? <!-- Backend - Do we need to consider migrations or backfilling data? -->
Hi, Do we have any solution to the issue "Uncaught ReferenceError: jsx is not defined". With NPM downgraded version is not available as well |
You can install the previous version that's compatible with the old jsx system. |
* Fix bug where is-plain-obj is not transpiled by Jest, update lock. * Update packages. * Mock useSelect for a handful of RichText selectors in test. * Resolve react to single version to avoid invalid hook errors. * Patch trim-html locally to avoid a bug in the released npm source. * Mock out resizeObserver to avoid FezVrasta/react-resize-aware#58 * Don't transpile config package: node-config/node-config#628
For those using jest and running into the JSX undefined issue, you can try simply mocking the hook:
|
Seems like v3.1.3 was released on npm yesterday, despite nothing here on GitHub. Has anyone given it a try to see if it solves this issue? |
I haven't changed that in the last release. But I plan to work on it tomorrow. |
4.0.0 should address this problem |
Hi, I depend on this package as a dependency of another npm package and I believe this issue: #57 is seeing the same problem I see.
When I build with Vite with the auto jsx runtime available in React 17 I cannot use this package due to its microbundle distribution. and I get the error
React is not defined
.I found that if I updated microbundle to latest and made an adjusted build for the jsx runtime, that I could use patch-package and still use this dependency.
The modified build command would be something like
microbundle --name useResizeAware --jsx jsx --jsxImportSource react --globals react/jsx-runtime=jsx
This was based on a suggestion here: developit/microbundle#763 (comment)I was just wondering if you would consider releasing a package with support for the auto jsx runtime? At least for my situation turning off the auto JSX runtime is not an option I have right now. I would be happy to submit a PR with the build changes, but my only concern would be testing it for other environments.
Thanks! ✌🏻
The text was updated successfully, but these errors were encountered: