-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deno + Vite: cannot resolve deno dependencies #26319
Comments
FYI: The format of the output of |
I can't seem to reproduce the issue in the repo that's linked, it runs without errors on my machine (macOS). What OS are you using? |
I'm on windows 11 |
That sounds like the same error as in #26343 |
Nope, Just downgraded to 2.0.0. The BadResource error goes away but the main issue is still there. |
@WerdoxDev did u ever get this solved? I am having the same issue. I am using a workspace with a deno api and basic vite+react app. I add all dependencies into the root deno.json imports. but get the above error from vite on the app. |
Version: Deno 2.0.0 & Deno 2.0.0-f94cdd1
I have followed both docs on creating a vite app with react:
Both tutorials work until you add a package. for example
@std/text
fromjsr
.The first one uses a third-party vite template which fully uses a
deno.json
file.The second one simply uses the
package.json
.If the package is added through
deno.json
, It kind of gets themod.ts
file of the package and nothing more. so it prints an error pointing to the firstexport * from "..."
line. in this case for@std/text
it's the levenshtein_distance.ts file.And if the package is added through
package.json
, it simply fails withFailed to resolve "package"
I'm even using the deno's official deno-vite-plugin which should resolve
jsr
,node
,https
packages. But one thing I noticed is that inside the code some of the types have V1 in their name which may indicate the package is not updated for version 2.0.0 hereHere is a reproduction repo using the
deno.json
method: https://github.com/WerdoxDev/deno-vite-bugThe text was updated successfully, but these errors were encountered: