linaria
linaria copied to clipboard
Exported identifiers must be unique
trafficstars
Environment
- Linaria version: 5.0.3
- Bundler (+ version): 5.88.0
- Node.js version: v18.16.1
- OS: macOS 14.0
Description
Error:
x the name `init` is exported multiple times
,-[**/dist/browser/index.js:1:1]
1 | export { _SENTRY_SDK_MULTIPLEXER, init, withSentryConfig, nextRouterInstrumentation, captureUnderscoreErrorException, withSentryGetStaticProps, wrapGetStaticPropsWithSentry, withSentryServerSideGetInitialProps, wrapGetInitialPropsWithSentry, withSentryServerSideAppGetInitialProps, wrapAppGetInitialPropsWithSentry, withSentryServerSideDocumentGetInitialProps, wrapDocumentGetInitialPropsWithSentry, withSentryServerSideErrorGetInitialProps, wrapErrorGetInitialPropsWithSentry, withSentryGetServerSideProps, wrapGetServerSidePropsWithSentry, wrapServerComponentWithSentry, wrapRouteHandlerWithSentry, wrapApiHandlerWithSentryVercelCrons, wrapMiddlewareWithSentry, BrowserTracing, Integrations, init, Profiler, useProfiler, withProfiler, ErrorBoundary, withErrorBoundary, createReduxEnhancer, reactRouterV3Instrumentation, reactRouterV4Instrumentation, reactRouterV5Instrumentation, withSentryRouting, reactRouterV6Instrumentation, withSentryReactRouterV6Routing, wrapCreateBrowserRouter, wrapUseRoutes, Integrations, FunctionToString, Hub, InboundFilters, ModuleMetadata, SDK_VERSION, Scope, addBreadcrumb, addGlobalEventProcessor, addTracingExtensions, captureEvent, captureException, captureMessage, close, configureScope, createTransport, extractTraceparentData, flush, getActiveSpan, getActiveTransaction, getCurrentHub, getHubFromCarrier, lastEventId, makeMain, makeMultiplexedTransport, setContext, setExtra, setExtras, setMeasurement, setTag, setTags, setUser, spanStatusfromHttpCode, startInactiveSpan, startSpan, startSpanManual, startTransaction, trace, withScope, WINDOW, BrowserClient, makeFetchTransport, makeXHRTransport, chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser, eventFromException, eventFromMessage, exceptionFromError, createUserFeedbackEnvelope, captureUserFeedback, defaultIntegrations, forceLoad, init, onLoad, showReportDialog, wrap, Replay, BrowserTracing, defaultRequestInstrumentationOptions, instrumentOutgoingRequests, makeBrowserOfflineTransport, onProfilingStartRouteTransaction, BrowserProfilingIntegration, GlobalHandlers, TryCatch, Breadcrumbs, LinkedErrors, HttpContext, Dedupe } from "@sentry/nextjs"; //# sourceMappingURL=index.js.map
: ^^|^ ^^|^
: | `-- exported more than once
: `-- previous exported here
`----
I believe it's because in @sentry/nextjs, after using export * from '@sentry/node', they also export the init function, which is causing this error.
https://github.com/getsentry/sentry-javascript/blob/develop/packages/nextjs/src/server/index.ts#L15
Reproducible Demo
In my case, simply reexporting @sentry/nextjs results in this error.
https://codesandbox.io/p/sandbox/tender-sea-gqsymt
Can you please provide a repro case on Stackblitz or in Github repo?
Hi @layershifter,
Here is the reproduction of this bug: https://codesandbox.io/p/sandbox/tender-sea-gqsymt