From dd7a6a2595181632ba618f0df6362fe972deea9f Mon Sep 17 00:00:00 2001 From: Ray Tien Date: Tue, 4 Jun 2024 10:59:11 +0800 Subject: [PATCH] Remove duplicate key 'message'. --- packages/vite/src/runtime/vite-node.mjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/vite/src/runtime/vite-node.mjs b/packages/vite/src/runtime/vite-node.mjs index d25a0b2fae..ebc41b97bc 100644 --- a/packages/vite/src/runtime/vite-node.mjs +++ b/packages/vite/src/runtime/vite-node.mjs @@ -49,8 +49,9 @@ function createRunner () { let _err try { const { message, stack } = formatViteError(errorData, id) + // The createError utility in h3 has already removed statusMessage _err = createError({ - statusMessage: 'Vite Error', + // statusMessage: 'Vite Error', message, stack, }) @@ -58,8 +59,9 @@ function createRunner () { consola.warn('Internal nuxt error while formatting vite-node error. Please report this!', formatError) const message = `[vite-node] [TransformError] ${errorData?.message || '-'}` consola.error(message, errorData) + // The createError utility in h3 has already removed statusMessage throw createError({ - message: 'Vite Error', + // message: 'Vite Error', message, stack: `${message}\nat ${id}\n` + (errorData?.stack || ''), })