Not sure about the compatibility but I generally compile my JS/CSS assets outside the VM in Windows (in my case). I will however run the composer commands within the VM. I've just found there's too many issues running NPM/Vite/Node within the VM (in addition to Windows issues).
Sep 28, 2022
2
Level 4
Homestead doesn't support nodejs 16 | Vite incompatibility
Hi, I updated my homestead vagrant box to the latest version and it ships with node v14 installed by default. Since Vite requires node v16+ it needs to be updated.
How did you solve this problem?
Level 15
Vite supports ^14.18.0, so any Node.js 14 version after that should be supported. You can see which Node versions Vite support by looking at the engines objects in their package.json file.
If it does work in Homestead because you have Node 14 then it could be another dependency that doesn't support it. npm should show a warning if any package installed is incompatible.
1 like
Please or to participate in this conversation.