saehm / DruidJS

A JavaScript Library for Dimensionality Reduction
107 stars 9 forks source link

Could not find a declaration file for module '@saehrimnir/druidjs' / module has no exports error #28

Closed filipforgac closed 2 years ago

filipforgac commented 2 years ago

I am trying to incorporate your library into my project. I am using Yarn package manager and I installed the package with yarn add @saehrimnir/druidjs. The installation finished successfully and I can see the package in node_modules. However, upon importing it I get this message: image

Moreover, after yarn start I get an error in the console like this, even though the modules from druid import are clearly recognized when I try to use them: image image

saehm commented 2 years ago

Hey,

try import * as druid from "@saehrimnir/druidjs/dist/druid.js.

filipforgac commented 2 years ago

Hey. That resulted in the same error, but fortunately import * as druid from "@saehrimnir/druidjs/dist/druid.esm" worked. I don't know why are the other imports problematic, but this is a solution for now.