facebook

"jsx": "react-jsx",

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #674709 Reply

    grafitemis
    Participant

    Hi all,

    Codemix complains about this line is tsconfig.json

    “jsx”: “react-jsx”,

    Argument for ‘–jsx’ option must be: ‘preserve’, ‘react-native’, ‘react’.

    However, anytime the
    npm start
    is executed, the value is reset to the above.

    How to fix this problem?

    Regards,

    #674710 Reply

    support-swapna
    Moderator

    Hi,

    Sorry that you are seeing this issue. I just tested it at my end and do not see it reset after running npm start.

    1. Do you see the reset happening consistently? Please share more details about the project, project type, Angular CLI, Node and NPM versions.
    2. Also share with us the .log file located at workspace dir/.metadata/.log (rename the extension to .txt and attach it here) along with the OS and version details.

    –Swapna
    Genuitec Support

    #676187 Reply

    blockhead89
    Participant

    Hi!
    The problem is urgent, it can be reproduced in the new version of the CRA:

    npx create-react-app my-app --template typescript
    
    # or
    
    yarn create react-app my-app --template typescript
    #676190 Reply

    support-swapna
    Moderator

    Hi,

    It looks like expected behavior with the new version of CRA.

    The following changes are being made to your tsconfig.json file:
      - compilerOptions.jsx must be react-jsx (to support the new JSX transform in React 17)

    Even outside of CodeMix, if you run npm start from command prompt, you will see the value being reset for the above reason.

    Hope this helps.

    –Swapna
    Genuitec Support

    #676212 Reply

    blockhead89
    Participant

    Everything is correct, but the problem is not that the value is dropped, but that IDE writes errors in the window.

    Errors disappear if the value "jsx": "react" is set in tsconfig, but if starting server (npm start) value changed and error show again(

    • This reply was modified 2 years, 6 months ago by blockhead89.
    • This reply was modified 2 years, 6 months ago by blockhead89.
    • This reply was modified 2 years, 6 months ago by blockhead89.
    Attachments:
    You must be logged in to view attached files.
    #676233 Reply

    support-swapna
    Moderator

    Hi,

    Thank you for the screenshot. I see the problem at my end with CodeMix.
    As CodeMix has already reached its End of Life, we will not be making any fixes or new releases to it : https://www.genuitec.com/products/codemix/end-of-life-notice/

    MyEclipse 2021 is the alternative which is based on Language Server tech and I do not see the validation errors reported for the same case in it. We have a trial period of 30 days for MyEclipse. You can download and evaluate it for your requirements : https://www.genuitec.com/products/myeclipse/download/

    Please let us know if you have any further questions.

    –Swapna
    Genuitec Support

    #676243 Reply

    blockhead89
    Participant

    Hi all!

    Anyone who wants to fix this problem, just update, manually, the TypeScript in “node_modules” folder in all the eclipse plugins found.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: "jsx": "react-jsx",

You must be logged in to post in the forum log in