stackblitz / webcontainer-core

Dev environments. In your web app.
https://webcontainers.io
MIT License
3.7k stars 139 forks source link

Multiple unexpected errors #1466

Open DaniGuardiola opened 2 weeks ago

DaniGuardiola commented 2 weeks ago

Describe the bug

I'm getting errors like these:

Module '"stackblitz:/node_modules/@types/react/ts5.0/index"' can only be default-imported using the 'esModuleInterop' flag(1259)
Cannot use JSX unless the '--jsx' flag is provided.(17004)

However, these do not make sense since everything is set up correctly. I based this blitz on the built-in React TypeScript template and simply followed the steps here to add Tailwind CSS support to it.

Link to the blitz that caused the error

https://stackblitz.com/edit/vitejs-vite-6pzzro?file=tailwind.config.js,src%2Fmain.tsx,src%2FApp.tsx,tsconfig.app.json&terminal=dev

Steps to reproduce

  1. Open sandbox.
  2. See errors in .ts files.

Expected behavior

There are no errors.

Note: I have not run this locally, because the linked guide in the issue form is completely unhelpful at guiding me to export the project so I can run it locally, I couldn't find the option in the UI, and I'm not about to recreate the file structure and manually copy the contents of each file. But since it's a required checkbox, I checked it rather than throwing this issue away.

Parity with Local

Screenshots

image image image image

Platform

Browser name  = Chrome
Full version  = 125.0.0.0
Major version = 125
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 143114081,
  "usedJSHeapSize": 137272577,
  "jsHeapSizeLimit": 4294705152
}
Hash = 9e2d28a3

Additional context

No response

NickWoodward commented 1 week ago

I'm literally getting this from the stackblitz React/TS starter template, incredibly annoying. Did you find a solution?