Skip to content

(React TypeScript) TypeError: DataIndex is not a constructor #44

@Devwulf

Description

@Devwulf

Hello! I've been encountering this problem every time I try to create an index for my database. I've been using AceBase on the browser-side with IndexedDB, and recreated this problem on Firefox, Chrome, and Opera. Here are the steps to recreate this problem:

  1. npx create-react-app test-acebase --template typescript
  2. Edit App.tsx to include these lines:
function App() {
  const db = AceBase.WithIndexedDB("test-db");
  db.indexes.create("users", "name");

  return (
  ...
  1. npm start
  2. The error DataIndex is not a constructor should show up on the browser.

Is indexing not meant to be used on the browser side? Or is there something else going on here? Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions