-
Notifications
You must be signed in to change notification settings - Fork 30.7k
Closed
Labels
TypeScriptRelated to types with Next.js.Related to types with Next.js.bugIssue was opened via the bug report template.Issue was opened via the bug report template.invalid linkThe issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.The issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.
Description
Link to the code that reproduces this issue
To Reproduce
import {spawn} from 'node:child_process'
import 'next'
spawn('echo', ['example'], {env: {EXAMPLE: 'example'}})Current vs. Expected behavior
No type error should happen. Instead, the following is printed:
No overload matches this call.
The last overload gave the following error.
Property 'NODE_ENV' is missing in type '{ EXAMPLE: string; }' but required in type 'ProcessEnv'.
When import 'next' is commented out, no type error happens (TypeScript playground).
Provide environment information
This is using the TypeScript playground, i.e. is not run on a local machine.Which area(s) are affected? (Select all that apply)
TypeScript
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
#8379 is a similar issue, but is distinct. Unlike #8379, this issue is not related to Execa and can be reproduced with node:child_process.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
TypeScriptRelated to types with Next.js.Related to types with Next.js.bugIssue was opened via the bug report template.Issue was opened via the bug report template.invalid linkThe issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.The issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.