Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

petervandijck's avatar

"Vite not found" on Forge

Hi, (beginner question). I'm struggling with getting NPM, Vite etc. to work well. Locally the site works well (tailwind). I am deploying via Forge. I get this deploy error now:

build vite build sh: 1: vite: not found

  • I have added npm run build to my deploy script
  • In my gitignore I did !/public/build

I'm a bit stumped and find it hard to wrap my head around how to fix this. Any pointers?

0 likes
5 replies
petervandijck's avatar

I forgot to mention the error: after deploying, it looks like the CSS wasn't built.

petervandijck's avatar

@MohamedTammam Just tried that, so I get this error now

npm ERR! Missing script: "install"

npm ERR!

npm ERR! Did you mean this?

npm ERR! npm uninstall # Remove a package

npm ERR!

npm ERR! To see a list of scripts, run:

npm ERR! npm run

npm ERR! A complete log of this run can be found in:

npm ERR! /home/forge/.npm/_logs/2023-07-12T23_46_37_319Z-debug-0.log

Please or to participate in this conversation.