0

我已按照GitHub 上的说明进行操作,但该示例不起作用。该应用程序显示“启动数据库”。在浏览器控制台有这个错误:

Uncaught (in promise) TypeError: storage is undefined
  _callee6$                                       http://127.0.0.1:20202/dist/rxdb.browserify.js:11032
  tryCatch                                        http://127.0.0.1:20202/dist/rxdb.browserify.js:70936
  invoke                                          http://127.0.0.1:20202/dist/rxdb.browserify.js:71167
  defineIteratorMethods                           http://127.0.0.1:20202/dist/rxdb.browserify.js:70992
  asyncGeneratorStep                              http://127.0.0.1:20202/dist/rxdb.browserify.js:14068
  _next                                           http://127.0.0.1:20202/dist/rxdb.browserify.js:14090
  _asyncToGenerator                               http://127.0.0.1:20202/dist/rxdb.browserify.js:14097
  _asyncToGenerator                               http://127.0.0.1:20202/dist/rxdb.browserify.js:14086
  _createRxDatabaseStorageInstances               http://127.0.0.1:20202/dist/rxdb.browserify.js:11060
  createRxDatabaseStorageInstances                http://127.0.0.1:20202/dist/rxdb.browserify.js:11017
  _callee7$                                       http://127.0.0.1:20202/dist/rxdb.browserify.js:11075
  tryCatch                                        http://127.0.0.1:20202/dist/rxdb.browserify.js:70936
  invoke                                          http://127.0.0.1:20202/dist/rxdb.browserify.js:71167
  defineIteratorMethods                           http://127.0.0.1:20202/dist/rxdb.browserify.js:70992
asyncGeneratorStep                                http://127.0.0.1:20202/dist/rxdb.browserify.js:14068
  _next                                           http://127.0.0.1:20202/dist/rxdb.browserify.js:14090
  _asyncToGenerator                               http://127.0.0.1:20202/dist/rxdb.browserify.js:14097
  _asyncToGenerator                               http://127.0.0.1:20202/dist/rxdb.browserify.js:14086
  _prepare                                        http://127.0.0.1:20202/dist/rxdb.browserify.js:11104
  prepare                                         http://127.0.0.1:20202/dist/rxdb.browserify.js:11064
  createRxDatabase                                http://127.0.0.1:20202/dist/rxdb.browserify.js:11142
  <anonymous>                                     http://127.0.0.1:20202/main.js:33

当我尝试添加英雄并单击“插入”按钮时,控制台会出现此错误:

Uncaught ReferenceError: col is not defined
  addHero http://127.0.0.1:20202/main.js:97
  onclick http://127.0.0.1:20202/:1

这是一个错误还是我错过了什么?

4

1 回答 1

0

根据rxdb v10 发行说明

“...许多(示例项目)已经过时,需要更新。”

我也无法让它工作。

于 2021-10-03T17:12:06.367 回答