Replies: 2 comments
-
I am getting the same issue |
Beta Was this translation helpful? Give feedback.
0 replies
-
Same here.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Wish you a very happy new year for all the community members.
I am trying to import fuse.js in to the Node.JS application as follows.
import Fuse from 'fuse.js';
By importing like the above I cannot construct a new object or create a new index and it gives the following errors.
const fuse = new Fuse(data, options);
Error:
fuse_js_1.default is not a constructor
const index = Fuse.createIndex(options.keys, data);
Error:
Cannot read property 'createIndex' of undefined
However when importing using the require
const Fuse = require('fuse.js')
there is no any errors.I would like to know the reasons for these errors.
TS Config:
ENV Details:
Node.JS: v14.17.1
Typescript: v4.2.4
fuse.js: v6.5.3
Thank you very much.
Beta Was this translation helpful? Give feedback.
All reactions