node-cross-spawn
node-cross-spawn copied to clipboard
error is null
The type from node child_process is:
interface SpawnSyncReturns<T> {
pid: number;
output: Array<T | null>;
stdout: T;
stderr: T;
status: number | null;
signal: NodeJS.Signals | null;
error?: Error | undefined;
}
but I am getting:
TypeError: Cannot read properties of null (reading 'message')
on something like:
if (subprocess.error !== undefined) {
this.error = new WebpackError(subprocess.error.message);
}