From 083505603f68a630284d66600f1d0a4aeec6ac4f Mon Sep 17 00:00:00 2001 From: GeopJr Date: Fri, 22 Jan 2021 11:04:46 +0000 Subject: [PATCH] chore(cli): fix typo (#8674) --- packages/cli/src/utils/serve.js | 2 +- packages/cli/test/unit/serve.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/utils/serve.js b/packages/cli/src/utils/serve.js index 055b6ff601..7b4214bd06 100644 --- a/packages/cli/src/utils/serve.js +++ b/packages/cli/src/utils/serve.js @@ -24,7 +24,7 @@ export async function serve (cmd) { const distStat = await fs.stat(options.generate.dir).catch(err => null) // eslint-disable-line node/handle-callback-err const distPath = join(options.generate.dir.replace(process.cwd() + sep, ''), sep) if (!distStat || !distStat.isDirectory()) { - throw new Error('Output directory `' + distPath + '` does not exists, please use `nuxt generate` before `nuxt start` for static target.') + throw new Error('Output directory `' + distPath + '` does not exist, please use `nuxt generate` before `nuxt start` for static target.') } const app = connect() app.use(compression({ threshold: 0 })) diff --git a/packages/cli/test/unit/serve.test.js b/packages/cli/test/unit/serve.test.js index c229113160..0090eca21a 100644 --- a/packages/cli/test/unit/serve.test.js +++ b/packages/cli/test/unit/serve.test.js @@ -22,7 +22,7 @@ describe('serve', () => { test('error if dist/ does not exists', () => { mockGetNuxtConfig({ target: TARGETS.static }) const cmd = NuxtCommand.from(serve) - expect(cmd.run()).rejects.toThrow(new Error('Output directory `dist/` does not exists, please use `nuxt generate` before `nuxt start` for static target.')) + expect(cmd.run()).rejects.toThrow(new Error('Output directory `dist/` does not exist, please use `nuxt generate` before `nuxt start` for static target.')) }) test('no error if dist/ dir exists', async () => {