Skip to content

Can't Use exceptionless/react on Next.js project #103

Closed
@polluterofminds

Description

@polluterofminds

When trying to import the @exceptionless/react package in Next.js, the following error occurs:

SyntaxError: Named export 'fromError' not found. The requested module 'stacktrace-js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'stacktrace-js';
const { fromError } = pkg;

Steps to reproduce:

  1. npx create-next-app app-name
  2. npm i @exceptionless/react
  3. in pages/index.js add the import line at the top: import { Exceptionless } from "@exceptionless/react";

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy