Netlify-cli nextjs "couldn't find pages directory"

Hi,

Trying to update netlify and nextjs and nodejs dependencies in my monorepo and it looks like the netlify cli is getting a bit confused with the folder structure. It gives an error when starting netlify dev that it "couldn't find a pages directory".

things I’ve tried so far:
If I create a pages directory at the root of the monorepo, it doesn’t crash.
If I run next dev instead of netlify dev without netlify it’s fine.
Removing cross-env NODE_ENV=development from netlify dev command does nothing.
Reinstalled all dependencies

apps/web/netlify.toml file:

[dev]
  command = "cross-env NODE_ENV=development next dev"

[build.environment]
  NETLIFY_NEXT_PLUGIN_SKIP = "true"
  NODE_VERSION = "20"

netlify dev crash log, executed from apps/web

◈ Netlify Dev ◈
◈ Injected netlify.toml file env var: NETLIFY_NEXT_PLUGIN_SKIP
◈ Injected netlify.toml file env var: NODE_VERSION
◈ Ignored general context env var: LANG (defined in process)
◈ Setting up local development server
Cleaned up apps/web/.netlify/edge-functions.
◈ Starting Netlify Dev with Next.js
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
✔ Waiting for framework port 3000. This can be configured using the 'targetPort' property in the netlify.toml

◈ Server now ready on http://localhost:8888

◈ Loaded edge function netlify dev handler
Error: > Couldn't find a `pages` directory. Please create one under the project root

apps/web/package.json

"netlify-cli": "^17.22.1",
"@netlify/functions": "^2.6.0",
"@netlify/plugin-sitemap": "^0.8.1",
"next": "^14.2.0",
"next-transpile-modules": "^10.0.1",

I added base = "apps/web" to both build and dev in netlify.toml and this seems to work. Did not have to do this in the past, but I guess it’s needed now.

[build]
  functions = "functions"
  command = "CI= npm run build"
  publish = "out"
  base = "apps/web"

[dev]
  base = "apps/web"
  command = "next dev"