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

Fix react-jsx error #9869

Merged
merged 1 commit into from
Oct 28, 2020
Merged

Fix react-jsx error #9869

merged 1 commit into from
Oct 28, 2020

Conversation

benneq
Copy link
Contributor

@benneq benneq commented Oct 23, 2020

Fixed an issue that prevented TypeScript apps from starting #9868 9868

@facebook-github-bot
Copy link

Hi @benneq!

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@iansu
Copy link
Contributor

iansu commented Oct 23, 2020

This fix is correct, it really is ReactJSX, however I don't think that alone will resolve #9868.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

1 similar comment
@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@ianschmitz ianschmitz added this to the 4.0.1 milestone Oct 26, 2020
@iansu iansu merged commit 545d460 into facebook:master Oct 28, 2020
@iansu
Copy link
Contributor

iansu commented Oct 28, 2020

Thanks!

@Brobin
Copy link

Brobin commented Nov 20, 2020

This should close the following issues once released: #10103 #10110 #10112 #10117

@zaneclaes
Copy link

zaneclaes commented Nov 20, 2020

Would it be possible to get a next build with these changes? There are many users totally unable to run their applications for several weeks now (see all the linked issues) despite using the current "stable" 4.0.0 build.

@zaneclaes
Copy link

zaneclaes commented Nov 20, 2020

Actually... I just tested the original issue (#9868) by manually patching my node_modules file. This PR does NOT fix the problem @benneq — just as @iansu suggested. See also: my comment here.

@benneq
Copy link
Contributor Author

benneq commented Nov 20, 2020

Wow. What kind of bot army is this? 20 emails from this issue today. Keep the pressure up. Everybody want's a 4.0.1 release!

@zaneclaes Would be nice if you had read the whole thread. Then you would have maybe figured out that this was already discussed and fixed in another PR.

@zaneclaes
Copy link

zaneclaes commented Nov 20, 2020

@benneq which "whole thread?" There are 5 of them linked from this PR alone (and I assume you don't mean this PR, since I don't see any linked PRs). I'm reviewing them now and I still don't see what you're referring to. I didn't mean to be snarky, but there are obviously many other people just as lost as I am, and I've spent literally hours reading these threads...

@benneq
Copy link
Contributor Author

benneq commented Nov 20, 2020

I know issue #9868 is long, but there are some comments about "Object.isFrozen" and referenced issues / merge request about "object is not extensible" which then leads to pull request #9921 which fixes the Object.isFrozen stuff.

Still we need a new release for 4.0.1 or even a 4.0.0-next.118 would make people happy.

The current "workarounds" (I don't want to call 'em like that) are to use 4.0.0-next.98 or version 3.x or manually applying the pull requests to you node_modules folder.

I don't know why facebook makes a new major release with major bugs and then it takes over 4 weeks to provide an update, which could be done with a single click. I mean: It can't get worse, right? 😆

@zaneclaes
Copy link

I know issue #9868 is long, but there are some comments about "Object.isFrozen" and referenced issues / merge request about "object is not extensible" which then leads to pull request #9921 which fixes the Object.isFrozen stuff.

Ah, I did read the discussion — but Github hid the PR in question behind multiple "expand hidden comments" 🙄

The current "workarounds" (I don't want to call 'em like that) are to use 4.0.0-next.98 or version 3.x or manually applying the pull requests to you node_modules folder.

Yep — that's what I documented in my linked comment, as well 😉

I don't know why facebook makes a new major release with major bugs and then it takes over 4 weeks to provide an update, which could be done with a single click. I mean: It can't get worse, right? 😆

Indeed. I try not to hate on OSS when I know how much work it is, but having a "stable" version of such a widely used tool leave dozens of devs dead-in-the-water for weeks on end is... frustrating. I've definitely lost at least one full day of work to this :sigh:

@CristianRaach
Copy link

CristianRaach commented Nov 20, 2020

I downgraded to version "4.0.0-dev.20200803" and solved my problem. #9868

[4/4] Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ typescript@4.0.0-dev.20200803
info All dependencies
└─ typescript@4.0.0-dev.20200803
Done in 838.92s.
cris in 05-primeiro-projeto-react on  master [✘!] took 13m 59s
yarn start
yarn run v1.22.5
warning ../package.json: No license field
$ react-scripts start
Compiled successfully!

You can now view 05-primeiro-projeto-react in the browser.

@omarmosid
Copy link

As suggested by @dyangua in #10110, I upgraded typescript from 4.0.3 to 4.0.5 and it seems to have fixed it for now

@cseas
Copy link

cseas commented Nov 22, 2020

Is there a released version that includes this fix?
I'm on react-scripts@4.0.0-next.117 but still line 151 at verifyTypeScriptSetup.js in my node_modules is ts.JsxEmit.ReactJsx

@mdugue
Copy link

mdugue commented Nov 23, 2020

@cseas looks like it was just released

Evalir added a commit to aragon/govern that referenced this pull request Dec 3, 2020
While it would be great to update to the latest version of React and all
its tooling, there seems to be an issue with typescript versions,
react-scripts and the new JSX transform wreaking havoc on the JSX
checks. While the issue was supposedly fixed here
(facebook/create-react-app#9869), upgrading to
react-scripts 4.0.1 doesn't fix the problem. Neither does upgrading AND
pinning typescript to 4.0.5 so it doesn't overwrite the tsconfig.json
file. Let's wait a few versions ahead for react-scripts so we can be
sure this is fixed.
Evalir added a commit to aragon/govern that referenced this pull request Dec 3, 2020
* console: add action pagination + cosmetic changes

* Add formatting for permissions section

* chore: remove unnecesary console log

* console: small improvements to links and general views

* Cosmetic enhancements a-la contraktor

* Add permissions filtering

* Increase delay for actions scheduled

* Handle token approvals

* Console demo statte

* Sort actions, show human readable execution time

* Fix linting / tooling

* Remove logging

* tooling: revert to React, React DOM & React scripts pre-React 17

While it would be great to update to the latest version of React and all
its tooling, there seems to be an issue with typescript versions,
react-scripts and the new JSX transform wreaking havoc on the JSX
checks. While the issue was supposedly fixed here
(facebook/create-react-app#9869), upgrading to
react-scripts 4.0.1 doesn't fix the problem. Neither does upgrading AND
pinning typescript to 4.0.5 so it doesn't overwrite the tsconfig.json
file. Let's wait a few versions ahead for react-scripts so we can be
sure this is fixed.
moeriki added a commit to moeriki/create-react-app that referenced this pull request Jan 22, 2021
wombleton pushed a commit to AurorNZ/create-react-app that referenced this pull request Jun 1, 2021
abhiisheek pushed a commit to abhiisheek/create-react-app that referenced this pull request May 19, 2023
abhiisheek pushed a commit to abhiisheek/create-react-app that referenced this pull request May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants