Skip to content

[Bug] package.json is missing a package "type": "module" description #16709

@AndreyYolkin

Description

@AndreyYolkin

Version

5.3.1

Link to Minimal Reproduction

No response

Steps to Reproduce

Create app with nuxt bridge
Build that app using nuxi build
preview this app using nuxi preview

Current Behavior

Node throws error while trying import package as cjs module

Expected Behavior

Node import package as esm module

Environment

- OS: Windows 11
- Browser: Chrome 97
- Framework: Nuxt 2 Bridge

Any additional comments?

After building the application with nuxt bridge and running the application, Node tryes to import echarts and zrender as CJS modules, but there are ESM, as I can see. After I specified "type": "module" in both packages, the problem has been solved.

Please specify module type in package.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussion-requiredFurther discussion is required before we decide if this issue should be fixed.enThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions