diff --git a/packages/sanity/src/hydration-test/server.tsx b/packages/sanity/src/hydration-test/server.tsx index f120cc5b..c8ba355f 100755 --- a/packages/sanity/src/hydration-test/server.tsx +++ b/packages/sanity/src/hydration-test/server.tsx @@ -49,7 +49,7 @@ export async function hydrationTest( } catch (error) { process.exitCode = 1; if (error) { - process.stderr.write(error.toString()); + process.stderr.write(error.toString() + '\n'); } } finally { if (server) { diff --git a/packages/scripts/src/cli.ts b/packages/scripts/src/cli.ts index db4fcadc..e5fdac35 100644 --- a/packages/scripts/src/cli.ts +++ b/packages/scripts/src/cli.ts @@ -57,7 +57,8 @@ program } catch (error) { process.exitCode = 1; if (error) { - process.stderr.write(error.toString()); + // Without a new-line, the error will not show on certain node versions + process.stderr.write(error.toString() + '\n'); } } }); diff --git a/packages/showcase/src/server/index.ts b/packages/showcase/src/server/index.ts index ad2751b4..5991c5f9 100644 --- a/packages/showcase/src/server/index.ts +++ b/packages/showcase/src/server/index.ts @@ -215,7 +215,7 @@ export async function buildWebsite( throw websiteStats.toString(); } } catch (e) { - process.stderr.write(e); + process.stderr.write(e + '\n'); process.exit(1); } } diff --git a/packages/utils/src/serve/log.ts b/packages/utils/src/serve/log.ts index 266b08a2..0bca9d74 100644 --- a/packages/utils/src/serve/log.ts +++ b/packages/utils/src/serve/log.ts @@ -66,7 +66,7 @@ export class Log { public compilationError(error: Error) { process.stderr.write(chalk.red('Compilation failed.\n')); - process.stderr.write(error.toString()); + process.stderr.write(error.toString() + '\n'); } public serverListening = (url: string) => {