✅ – Cansu – 10-12 Oct 30

Cannot use JSX unless the '--jsx' flag is provided.
Solution:
yes
D
DAMACANSU536d ago
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
L
lebouwski536d ago
the jsx line is commented out in tsconfig, remove the comment and set it to react
D
DAMACANSU536d ago
// "jsx": "preserve", /* Specify what JSX code is generated. */
?
Solution
L
lebouwski536d ago
yes
D
DAMACANSU536d ago
thank you it worked thank you thank you
L
lebouwski536d ago
meowthumbsup
UU
Unknown User536d ago