diff --git a/CHANGELOG.md b/CHANGELOG.md index b32f7970..6caa9324 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,10 @@ - enh(android): Show link to issues page after setup is complete (#448) - fix(nextjs): Add selfhosted url in `next.config.js` (#438) - +- fix(nextjs): Create necessary directories in app router (#439) + +Work in this release contributed by @andreysam. Thank you for your contributions! + ## 3.12.0 - feat(sourcemaps): Automatically insert Sentry Webpack plugin (#432) diff --git a/src/nextjs/nextjs-wizard.ts b/src/nextjs/nextjs-wizard.ts index 61b62aef..734fdce5 100644 --- a/src/nextjs/nextjs-wizard.ts +++ b/src/nextjs/nextjs-wizard.ts @@ -325,6 +325,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(), @@ -342,9 +349,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(