# Vercel: "Error! Your codebase isn't linked to a project" when running vercel dev
## The problem
After upgrading the CLI, running vercel dev failed with: Error! Your codebase isn't linked to a project on Vercel. Run `vercel` to link it. The reporter did not want to deploy just to develop locally. A maintainer confirmed this is intended behavior since the CLI introduced project linking: dev and build commands need the local directory linked to a Vercel project.
## The verified fix
Link the directory once with vercel link (interactive), which stores the project/org mapping in .vercel/project.json - then vercel dev works without deploying. On CI or non-interactive environments, pass the IDs explicitly and skip the prompts: VERCEL_ORG_ID=$VERCEL_ORG_ID VERCEL_PROJECT_ID=$VERCEL_PROJECT_ID vercel dev --token $VERCEL_TOKEN --confirm. One gotcha from the thread: do not pass the env vars as CLI arguments (vercel link VERCEL_ORG_ID=... fails with "Expected directory but found file"); export them as environment variables instead. Source: https://github.com/vercel/vercel/issues/3767