We are running a quite simple setup where we have a Vuepress project that is built using yarn build which relates to vuepress build. It all worked pretty great so far (first time netlify user)
We now wanted an environment variable in production builds.
To do so, I added a netlify.toml that looks like the following:
[context.production]
environment = { NODE_ENV = "production" }
I do not know why, but suddenly the build on the main branch (which is our production build) breaks because yarn cannot find the vuepress command anymore.
This worked fine before the introduction of the netlify.toml (and still works fine for non-production branches)
The build log looks like:
3:04:22 PM: $ yarn docs:build
3:04:22 PM: yarn run v1.22.10
3:04:22 PM: $ vuepress build docs --clean-cache --clean-temp
3:04:22 PM: /bin/sh: 1: vuepress: not found
3:04:22 PM: error Command failed with exit code 127.
3:04:22 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.