Sage Installation - npm build Issue

Hi guys,

So per advice using the latest sage 11 version avaliable. Got the enviroment all up and running (Ubuntu desktop 22.04 & VM & Trellis). I was able to create the setup using trellis new command and also installed sage11 using the command on this page: Installing Sage | Sage Docs | Roots

I have WP-CLI/volta/node/composer/yarn all up and running.

When i get to the: npm install I get the following:

added 114 packages, and audited 115 packages in 6s

25 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

I then check the: vite.config.js file but do not see where to add the local url?

Then when I run: npm run build i get an error:

build
vite build

sh: 1: vite: not found

The site at this time doesnt work in local browser. HOWEVER if i run yarn build that does start compiling and does get the site up and running so I can view it in the local browser. Assets are compiled successfully.

Can anyone lmk what I am doing wrong? is there any issues to using yarn build? what reason would npm build not work? Thank you.

The local url goes in vite.config.js where it says base:

export default defineConfig({
  base: '/wp-content/themes/your-theme/public/build/',
1 Like