Error on yarn build

I’m trying out the sage 10 but for some reason, I can’t run yarn build.

yarn run v1.22.21
$ bud build
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I’m running on php 8, node v18.8. I also added the “post-autoload-dump” in composer.json

"scripts": {
  //...
  "post-autoload-dump": [
    "Roots\\Acorn\\ComposerScripts::postAutoloadDump"
  ]
}

What am I missing?

I was having the same issue on windows.

It was because I was missing an .eslintrc.cjs file in the root.

Sometimes it can be helpful to delete the node_module and package-lock.json
Run yarn clean cache
then yarn install