Netlify CLI won't run _any_ build commands

I’m trying to use the Netlify CLI to run my app, which is a monorepo. This is the command and output I get:

yarn netlify dev --filter issue-form
◈ Netlify Dev ◈
◈ Injecting environment variable values for all scopes
◈ Ignored general context env var: LANG (defined in process)
◈ Setting up local development server
◈ Starting Netlify Dev with Vite
⠋ Waiting for framework port 5173. This can be configured using the 'targetPort' property in the netlify.toml◈ Failed running command: turbo run dev --filter issue-form. Please verify 'turbo' exists

No matter what command I use, it fails with the “Please verify ‘x’ exists” message.

If I update my netlify.toml to this for that app:

[dev]
  command = "echo 123"

It ends with the message:

◈ Failed running command: echo 123. Please verify 'echo' exists

What do I need to change in my configuration or how I call netlify dev to make this work?

1 Like

Please share a minimal example to reproduce this problem.

I’m surprised more people aren’t talking about this. This seems to be a regression. Downgrading to 15.11.0 of netlify-cli fixes the issue. I wonder if newer versions don’t include npm and yarn by default in the build images.

The CLI doesn’t have anything to do with the build images. It simply runs the commands available on your system. Sure there could be a bug somewhere, but it’s definitely not widespread. You’re the second one of the rare people to report this so far.

The best course of action would be to file an issue on the CLI repo: Issues · netlify/cli · GitHub so the devs can then directly engage with you.

The issue was caused when running netlify dev in a sub directory when the parent directory had a package.json. Netlify-cli used to use the base set in [build] in netlify.toml. You now need to set the base specifically in [dev]

thanks for sharing this with the community.

Hey all, I had a similar issue in a mono-repo with multiple apps.

Running netlify dev --filter apps/projectName from my base dir would error out.

For me, npm was apparently ‘missing’ (even though it was not).

◈ Please verify 'npm' exists

The fix for me was using netlify unlink, assuming you had a project linked already via netlify link.

My dev CLI commands work again.

Hello, chiming in that I encountered this issue running the latest version of netlify-cli. Unlinking did not help but downgrading to version 15.11 did resolve the issue.