Issue 17557 describes a situation where "vercel dev" pulls all environment variables across all branches, leading to a failure to start because the environment is too big (E2BIG error).
Per the contribution guidelines, I'm here to propose a fix, which is as follows:
src/commands/dev/dev.ts:156 — current:
envValues = (await pullEnvRecords(client, project.id, 'vercel-cli:dev'))
.env;
Proposed:
envValues = (
await pullEnvRecords(client, project.id, 'vercel-cli:dev', {
target: 'development',
})
).env;
The current code has no target, and so I believe ends up pulling variables across all targets. The new code should just pull the development variables.
Any concerns with this approach to fixing?
Andrew