Skip to content

Attempted import error: 'detect-browser' does not contain a default export (imported as '$detectbrowser'). #353

@junjieit

Description

@junjieit

The packaging tool will package import { detect } from 'detect-browser'; into the following code

import $detectbrowser from "detect-browser";
const { detect } = $detectbrowser;

image

Cause nextjs environment to report errors
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions