Skip to content

Doesn't work with Vitejs #594

@simoneb

Description

@simoneb

Describe the bug

Danfojs cannot be loaded in a Vitejs project.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Vitejs project
  2. Install danfojs as a dependency
  3. Import it in any module of the application with import * as dfd from 'danfojs'
  4. See the error below:

[plugin:vite:import-analysis] Failed to resolve entry for package "danfojs". The package may have incorrect main/module/exports specified in its package.json.

Expected behavior

The import works and you can use danfojs in your Vitejs app

Repro

You can see a repro in CodeSandbox here. Creating a new Vitejs application locally leads to the same issue (meaning that it's not an issue with CodeSandbox), and the issue happens regardless of whether you use TypeScript or JavaScript.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions