Skip to content

Sentry creates rewriteFramesHelper.js during Nextjs "standalone" static generation #4684

Closed
@calix

Description

@calix

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which package are you using?

@sentry/nextjs

SDK Version

6.18.1

Framework Version

No response

Link to Sentry event

No response

Steps to Reproduce

We are switching to generating a standalone bundle for our Nextjs project according to: https://nextjs.org/docs/advanced-features/output-file-tracing

This issue is possible to reproduce when bundling NextJS using:

module.exports = { experimental: { outputStandalone: true, }, }

next.config.js consumes the config using withSentryConfig as described in the docs:

module.exports = withSentryConfig(moduleExports, sentryWebpackPluginOptions);

We first detected the issue when our Azure pipeline failed at:

> Build error occurred [Error: ENOENT: no such file or directory, mkdir 'D:\a\1\s\.next\standalone\.next\server\pages\C:\Users\VSSADM~1\AppData\Local\Temp\sentry-Yr02pe'] { errno: -4058, code: 'ENOENT', syscall: 'mkdir', path: 'D:\\a\\1\\s\\.next\\standalone\\.next\\server\\pages\\C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\sentry-Yr02pe' } ##[error]Cmd.exe exited with code '1'.
Sentry is for some reason trying to generate a folder for the file rewritesFramesHelper.js during nextjs "Generating static pages".

When running locally, this directory is created in the root NextJS folder.

Expected Result

Expect sentry not to spam the project folder with directory sentry-xxxxx.

Actual Result

image

As you can see, Sentry is creating a folder Users...../sentry-xxxxxx containing rewritesFramesHelper.js.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions