Open mbrahimi02 opened 2 weeks ago
Can you create a reproduction for us to try? The best thing to do is create a GitHub repo with the code you are trying to run, and then add the output you are seeing instead of what you want to see.
@lucacasonato Turns out the maintainers for create-vite script swapped react/react-dom imports hence the issue.
Not sure why the path thing isn't working but I can just manually add it
Thank you for noticing @mbrahimi02.
in ./src/main.js
// @deno-types="@types/react"
import { createRoot } from 'react'
// @deno-types="@types/react-dom/client"
import { StrictMode } from 'react-dom/client'
to
// @deno-types="@types/react"
import { StrictMode } from 'react'
// @deno-types="@types/react-dom/client"
import { createRoot } from 'react-dom/client'
Version: Deno 2.0.2
I just started playing around with Deno by trying to create a starter React project with Vite using create-vite-extra and the deno-react template. Everything works fine with the TS variant when running deno task dev, but seems to have issues with JS. Nothing loads on the browser and console shows ‘createRoot is not a function’ despite the fact that all the packages for react and vite plugins and compiler options are already set at project creation.
Kind of a side note but I started with 2.0.1 via homebrew and there I get totally different results. Something about bad request and websocket failure. Removed brew deno and installed 2.0.2 via shell script. Even the shell script doesn’t appear to add deno to path after I allowed it to do so.