-
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
Bug: Cannot find vite
#25616
Comments
You need to do |
When I add $ deno task dev
Task dev vite
vite: command not found |
That looks like a regression, indeed. |
I'm fairly sure this never worked. We don't, in general, try to figure out what to autoinstall based just on a bin command. |
I'm probably a bit old-fashioned here, but people who use vite are coming from node, and just talking for myself, I'm really intersted in a stable/fast manual flow, and not used to, or particularly interested in, anything related to package auto-installs. At least not if it's at the cost of a worse manual package install flow (I have the |
Could you expand a bit on this? I'm not sure I follow
Nevermind about that suggestion, that's not the right fix. I didn't think through it enough 😅 |
Sure, I can see it's not so clear what I meant. I don't see any technical blockers for having both great manual/autoinstall flows - but in the case of prioritization/limited engineering time+resources (and there often is) I'd personally lean far towards making the new manual install / task execution flow absolutely stellar, before figuring out how to automate it. |
FYI: I opened this issue because it occurred despite calling |
@marvinhagemeister does the issue persist for you after you call |
It works if the If I set the Warning `"nodeModulesDir": true` is deprecated in Deno 2.0. Use `"nodeModulesDir": "auto"` instead`. Instead of having to remember setting this, would it be possible to default |
It's not the only option left, there's also |
Oh I've just realized that @marvinhagemeister 's PR to vite (vitejs/vite#18081) will actually fix this as well. The issue is that vite thinks that the deno project is CJS (fake ESM), so it transpiles it to CJS with |
Can confirm, updating to vite |
Steps to reproduce
deno.json
with these contents:vite.config.ts
file with these contents:deno install
deno task dev
Output:
Version: Deno 2.0.0-rc.2+606b7b1
The text was updated successfully, but these errors were encountered: