creately / rxdata

A reactive document database for web browsers
MIT License
11 stars 1 forks source link

Argument of type is not assignable to parameter of type 'DatabaseOptions'. #43

Closed 4F2E4A2E closed 5 years ago

4F2E4A2E commented 6 years ago

Hi there 👋

const db = new Database('xyz'); is not working as described in the readme Error:(9, 25) TS2345: Argument of type '"xyz"' is not assignable to parameter of type 'DatabaseOptions'.

And following error without the parameter:

const db = new Database();

Error: No available storage method found.
    at ...\node_modules\localforage\dist\localforage.js:2743:25
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:118:7)
    at Function.Module.runMain (module.js:692:11)
    at startup (bootstrap_node.js:194:16)
    at bootstrap_node.js:666:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1

version 3.2.1

thani-sh commented 6 years ago

Hi @4F2E4A2E

There was a typo in the Readme file. The npm module rxdata is an old version of this module. It was renamed to @creately/rxdata. The typo was fixed in https://github.com/creately/rxdata/pull/45

I believe the error came up because it was used inside nodejs. https://github.com/creately/rxdata/issues/44#issuecomment-383021008