lukehaas / RunJS

RunJS is a JavaScript playground for macOS, Windows and Linux. Write code with instant feedback and access to Node.js and browser APIs.
https://runjs.app
2k stars 43 forks source link

Can't use React in a scratch file #596

Closed vladyn closed 7 months ago

vladyn commented 7 months ago
image

Hi there, I'm trying to play with a React JS functional component, and I've installed React as a dependency, But for some reason, RunJS warns me that the module could not be loaded/found. Could you please advise me on what I'm doing wrong?

lukehaas commented 7 months ago

The warning is for the declaration file, not the module itself. You will either need to install the declaration file for react or disable TypeScript.

On Sun, 19 Nov 2023 at 20:10, Vladimir Varbanov @.***> wrote:

[image: image] https://user-images.githubusercontent.com/107272/284087286-5102a964-7fab-4664-95fa-44c481933172.png Hi there, I'm trying to play with a React JS functional component, and I've installed React as a dependency, But for some reason, RunJS warns me that the module could not be loaded/found. Could you please advise me on what I'm doing wrong?

— Reply to this email directly, view it on GitHub https://github.com/lukehaas/RunJS/issues/596, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFU7YHFUHFKZITXJBTTVITYFJRRVAVCNFSM6AAAAAA7R633IGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYDCMBRGY3DMOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

vladyn commented 7 months ago

how can I disable the typescript?


From: Luke Haas @.> Sent: Sunday, November 19, 2023 10:21 PM To: lukehaas/RunJS @.> Cc: Vladimir Varbanov @.>; Author @.> Subject: Re: [lukehaas/RunJS] Can't use React in a scratch file (Issue #596)

The warning is for the declaration file, not the module itself. You will either need to install the declaration file for react or disable TypeScript.

On Sun, 19 Nov 2023 at 20:10, Vladimir Varbanov @.***> wrote:

[image: image] https://user-images.githubusercontent.com/107272/284087286-5102a964-7fab-4664-95fa-44c481933172.png Hi there, I'm trying to play with a React JS functional component, and I've installed React as a dependency, But for some reason, RunJS warns me that the module could not be loaded/found. Could you please advise me on what I'm doing wrong?

— Reply to this email directly, view it on GitHub https://github.com/lukehaas/RunJS/issues/596, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFU7YHFUHFKZITXJBTTVITYFJRRVAVCNFSM6AAAAAA7R633IGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYDCMBRGY3DMOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/lukehaas/RunJS/issues/596#issuecomment-1817966630, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAA2GCGJM2CIWFL3BNSPEKTYFJS6NAVCNFSM6AAAAAA7R633IGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXHE3DMNRTGA. You are receiving this because you authored the thread.Message ID: @.***>

vladyn commented 7 months ago

I handled it. Thanks for the fast advise!