From 69c08087692e20241e672e591ab35526af0ac811 Mon Sep 17 00:00:00 2001 From: meesvandongen <35409045+meesvandongen@users.noreply.github.com> Date: Fri, 17 Mar 2023 19:38:27 +0100 Subject: [PATCH] fix: typo in output:export error messages --- packages/next/src/server/config.ts | 8 ++++---- test/integration/config-output-export/test/index.test.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/next/src/server/config.ts b/packages/next/src/server/config.ts index b5fba3d992f87..f71a19de2cfbc 100644 --- a/packages/next/src/server/config.ts +++ b/packages/next/src/server/config.ts @@ -263,22 +263,22 @@ function assignDefaults( if (result.output === 'export') { if (result.i18n) { throw new Error( - 'Specified "i18n" cannot but used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export' + 'Specified "i18n" cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export' ) } if (result.rewrites) { throw new Error( - 'Specified "rewrites" cannot but used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export' + 'Specified "rewrites" cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export' ) } if (result.redirects) { throw new Error( - 'Specified "redirects" cannot but used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export' + 'Specified "redirects" cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export' ) } if (result.headers) { throw new Error( - 'Specified "headers" cannot but used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export' + 'Specified "headers" cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export' ) } } diff --git a/test/integration/config-output-export/test/index.test.ts b/test/integration/config-output-export/test/index.test.ts index 52d2e4ee18aa1..3a8c2089ea5fb 100644 --- a/test/integration/config-output-export/test/index.test.ts +++ b/test/integration/config-output-export/test/index.test.ts @@ -59,7 +59,7 @@ describe('config-output-export', () => { }, }) expect(stderr).toContain( - 'Specified "i18n" cannot but used with "output: export".' + 'Specified "i18n" cannot be used with "output: export".' ) }) @@ -69,7 +69,7 @@ describe('config-output-export', () => { rewrites: [{ source: '/from', destination: '/to' }], }) expect(stderr).toContain( - 'Specified "rewrites" cannot but used with "output: export".' + 'Specified "rewrites" cannot be used with "output: export".' ) }) @@ -79,7 +79,7 @@ describe('config-output-export', () => { redirects: [{ source: '/from', destination: '/to', permanent: true }], }) expect(stderr).toContain( - 'Specified "redirects" cannot but used with "output: export".' + 'Specified "redirects" cannot be used with "output: export".' ) }) @@ -94,7 +94,7 @@ describe('config-output-export', () => { ], }) expect(stderr).toContain( - 'Specified "headers" cannot but used with "output: export".' + 'Specified "headers" cannot be used with "output: export".' ) })