Skip to content

Problem to use npyjs in jest #50

@vallsv

Description

@vallsv

Hi,

I receive that error message when i try to import npyjs from jest.

Do you have any idea if this could be removed? Maybe moved inside the load function?

    /home/mystuffs/test/node_modules/.pnpm/npyjs@0.7.0/node_modules/npyjs/index.js:1
    import fetch from 'cross-fetch';
    ^^^^^^

    SyntaxError: Cannot use import statement outside a module

      4 | import ndarray from "ndarray";
      5 | import ops from "ndarray-ops";
    > 6 | import npyjs from "npyjs";
        | ^

Without the load function we still can use the parse.

If you have any idea how to solve that it would be very useful.

Thanks a lot.

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