Directory for Acorn installation

Hi guys, sorry for the stupid question

I’ve been looking at the docs over and over again and I can’t seem to know where I should run the ‘composer require roots/acorn’ command.

I’m using Ubuntu 23.10, Trellis (via the ‘trellis new’) and Bedrock with the Sage 10 theme. I’ve already installed Acorn in the ‘/themes/sage’ folder and after I ran the ‘wp acorn:make component ComponentName’ command I got a MySQL error.

I researched a bit and saw that this command should be ran from the vm, so I ran ‘trellis exec wp acorn:make component ComponentName’, but I always get the 'No WordPress installation found and ```
Error: ‘acorn’ is not a registered wp command. See ‘wp help’ for available commands.
Did you mean ‘core’?

Can somebody help?

trellis exec is not running the wp command from the correct directory

Either SSH into the vagrant box and then cd /srv/www/ to run wp commands, or setup WP-CLI aliases (trellis alias) and then you can use wp @development acorn from your host machine

1 Like

Thanks so much! It worked fine now