Skip to content

Commit 3cef4f3

Browse files
committed
fix: convert more errors to strings
1 parent d3cf87c commit 3cef4f3

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/create-nuxt/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const _main = defineCommand({
2424

2525
// Check Node.js version and CLI updates in background
2626
if (provider !== 'stackblitz') {
27-
await checkEngines().catch(err => logger.error(err))
27+
await checkEngines().catch(err => logger.error(String(err)))
2828
}
2929

3030
await init.run?.(ctx)

packages/nuxi/src/commands/module/add.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ async function addModules(modules: ResolvedModule[], { skipInstall = false, skip
185185
workspace: packageManager?.name === 'pnpm' && existsSync(resolve(cwd, 'pnpm-workspace.yaml')),
186186
}).then(() => true).catch(
187187
async (error) => {
188-
logger.error(error)
188+
logger.error(String(error))
189189

190190
const failedModulesList = notInstalledModules.map(module => colors.cyan(module.pkg)).join(', ')
191191
const s = notInstalledModules.length > 1 ? 's' : ''

packages/nuxi/src/commands/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ async function importTestUtils(): Promise<typeof import('@nuxt/test-utils')> {
5858
err = _err
5959
}
6060
}
61-
logger.error(err as string)
61+
logger.error(String(err))
6262
throw new Error('`@nuxt/test-utils` seems missing. Run `npm i -D @nuxt/test-utils` or `yarn add -D @nuxt/test-utils` to install.')
6363
}

packages/nuxi/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const _main = defineCommand({
5858
if (command !== '_dev' && provider !== 'stackblitz') {
5959
backgroundTasks = Promise.all([
6060
checkEngines(),
61-
]).catch(err => logger.error(err))
61+
]).catch(err => logger.error(String(err)))
6262
}
6363

6464
// Avoid background check to fix prompt issues

packages/nuxt-cli/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const _main = defineCommand({
3939
if (command !== '_dev' && provider !== 'stackblitz') {
4040
backgroundTasks = Promise.all([
4141
checkEngines(),
42-
]).catch(err => logger.error(err))
42+
]).catch(err => logger.error(String(err)))
4343
}
4444

4545
// Avoid background check to fix prompt issues

0 commit comments

Comments
 (0)