[GH-ISSUE #44] (React TypeScript) TypeError: DataIndex is not a constructor #38

Closed
opened 2026-05-23 08:27:28 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @Devwulf on GitHub (Oct 5, 2021).
Original GitHub issue: https://github.com/appy-one/acebase/issues/44

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!

Originally created by @Devwulf on GitHub (Oct 5, 2021). Original GitHub issue: https://github.com/appy-one/acebase/issues/44 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: ```js function App() { const db = AceBase.WithIndexedDB("test-db"); db.indexes.create("users", "name"); return ( ... ``` 3. `npm start` 4. 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!
Author
Owner

@appy-one commented on GitHub (Oct 8, 2021):

Indexing is not yet available in the browser implementation, currently only for binary databases in node.js. It's on my todo list, can't say when I'll be able to build it though.

<!-- gh-comment-id:938699441 --> @appy-one commented on GitHub (Oct 8, 2021): Indexing is not yet available in the browser implementation, currently only for binary databases in node.js. It's on my todo list, can't say when I'll be able to build it though.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase#38
No description provided.