question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Importing in `sentry.client/server.js` causes `Error: Aborted because ... is not accepted` error

See original GitHub issue

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/nextjs

SDK Version

7.21.0

Framework Version

Next.js v12.3.0

Link to Sentry event

No response

Steps to Reproduce

My Next.js project contains:

  • /sentry.server.config.js
  • /sentry.client.config.js
  • /sentry.common.config.js <- my custom file having rules/hooks that both the server and client config share

With the /sentry.common.config.js file, my terminal now throws: Error: Aborted because ./sentry.common.config.js is not accepted errors.

I’d guess that sentry reserves the right for all sentry.*.config.js files, where * must be an accepted name and the file itself must initialize a sentry config.

I fail to find the above assumption in the documentation and am curious as to how else I then should create this common file? Furthermore, I’ve found several feature request issues asking for the possibility of moving the config files in folders and not pollute the root directory. However, having a whole /sentry directory just for this single common config file seems unnecessary too.

Expected Result

N/A

Actual Result

N/A

Issue Analytics

  • State:open
  • Created 9 months ago
  • Reactions:1
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
lforstcommented, Dec 6, 2022

Not atm, most likely some webpack shenanigans.

0reactions
larsqacommented, Dec 6, 2022

Great! Any idea why this happens? ESM/CJS issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting "Aborted because 0 is not accepted" and full page ...
I am using webpack in an existing rails app. But it isn't hot-reloading. It is simply triggering a reload every time my react...
Read more >
gaearon/react-hot-loader
Hello! I have a problem with hot reloading while transpiling whole node_modules to ES5. I have the infamous Objects are not valid as...
Read more >
sentry Changelog
This release fixes a bug from 6.19.0 causing type import errors in most JS SDKs. - fix(types): Point to type definitions in dist...
Read more >
Changelog - Docs - Sentry Documentation
Most events will no longer cause a hard error when validation fails. Instead we attempt to drop any non-required data so that at...
Read more >
Time Tracking Report
Bug, QTCREATORBUG-27003, Reported, Not Evaluated, Crash when importing cmake build ... Not Evaluated, building from locator while building causes error.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found