R
Reactiflux

✅ – Cansu – 10-12 Oct 30

✅ – Cansu – 10-12 Oct 30

DDAMACANSU10/30/2022
Cannot use JSX unless the '--jsx' flag is provided. Ahem.
ERROR in src/app.tsx:44:5
TS17004: Cannot use JSX unless the '--jsx' flag is provided.
42 |
43 | return (
> 44 | <div>
| ^^^^^
45 | <button id="button" onClick={send}> VUR BANA </button>
46 | {/*put server message here*/}
47 | <div>{outerHTML}</div>

ERROR in src/app.tsx:45:5
TS17004: Cannot use JSX unless the '--jsx' flag is provided.
43 | return (
44 | <div>
> 45 | <button id="button" onClick={send}> VUR BANA </button>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46 | {/*put server message here*/}
47 | <div>{outerHTML}</div>
48 | </div>

ERROR in src/app.tsx:47:5
TS17004: Cannot use JSX unless the '--jsx' flag is provided.
45 | <button id="button" onClick={send}> VUR BANA </button>
46 | {/*put server message here*/}
> 47 | <div>{outerHTML}</div>
| ^^^^^
48 | </div>
49 | )
50 |
ERROR in src/app.tsx:44:5
TS17004: Cannot use JSX unless the '--jsx' flag is provided.
42 |
43 | return (
> 44 | <div>
| ^^^^^
45 | <button id="button" onClick={send}> VUR BANA </button>
46 | {/*put server message here*/}
47 | <div>{outerHTML}</div>

ERROR in src/app.tsx:45:5
TS17004: Cannot use JSX unless the '--jsx' flag is provided.
43 | return (
44 | <div>
> 45 | <button id="button" onClick={send}> VUR BANA </button>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46 | {/*put server message here*/}
47 | <div>{outerHTML}</div>
48 | </div>

ERROR in src/app.tsx:47:5
TS17004: Cannot use JSX unless the '--jsx' flag is provided.
45 | <button id="button" onClick={send}> VUR BANA </button>
46 | {/*put server message here*/}
> 47 | <div>{outerHTML}</div>
| ^^^^^
48 | </div>
49 | )
50 |
Compiled with >
tsc --jsx react
https://pastebinp.com/7ldn4NZEaiBd7ch6gmtQ#ThdmsQr9e1qlQgoZdgJ5EFLsbpnIV2cFWdB5GUzUgTU= this is the tsconfig.json and this is how i run npm start
npm start --jsx
Solution:
yes
Jump to solution
Llebouwski10/30/2022
the jsx line is commented out in tsconfig, remove the comment and set it to react
DDAMACANSU10/30/2022
// "jsx": "preserve", /* Specify what JSX code is generated. */
?
Solution
Llebouwski10/30/2022
yes
DDAMACANSU10/30/2022
thank you it worked thank you thank you
Llebouwski10/30/2022
meowthumbsup
UUUnknown User10/30/2022
3 Messages Not Public
Sign In & Join Server To View

Looking for more? Join the community!

R
Reactiflux

✅ – Cansu – 10-12 Oct 30

Join Server