From a6021cb399ba264858bf3fc1dd8c79c501cfceeb Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 11 Sep 2023 17:32:17 +0300 Subject: [PATCH] fix(nextjs): create necessary directories in... app router --- src/nextjs/nextjs-wizard.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/nextjs/nextjs-wizard.ts b/src/nextjs/nextjs-wizard.ts index bb2e7c32..44680f2e 100644 --- a/src/nextjs/nextjs-wizard.ts +++ b/src/nextjs/nextjs-wizard.ts @@ -323,6 +323,13 @@ export async function runNextjsWizard(options: WizardOptions): Promise { useClient: true, }); + fs.mkdirSync( + path.join(process.cwd(), ...appLocation, 'sentry-example-page'), + { + recursive: true, + }, + ); + await fs.promises.writeFile( path.join( process.cwd(), @@ -340,9 +347,12 @@ export async function runNextjsWizard(options: WizardOptions): Promise { )}.`, ); - fs.mkdirSync(path.join(process.cwd(), ...appLocation, 'api'), { - recursive: true, - }); + fs.mkdirSync( + path.join(process.cwd(), ...appLocation, 'api', 'sentry-example-api'), + { + recursive: true, + }, + ); await fs.promises.writeFile( path.join(