Topic: PWA Angular Lession 6

russellclark free asked 5 years ago


Expected behavior I am following this course creating the idb service https://mdbootstrap.com/education/pwa/angular/lesson-6-creating-indexeddb-database/

Actual behavior App fails to compile witth these errors:

file: idb.service.ts

1)import statement: import idb from 'idb';

ERROR: Module node_modules/idb/build/esm/index has no default export.

2) connectToIDB function: this.dbPromise = idb.openDB('pwa-database', 1, UpgradeDB => {...

ERROR: Parameter 'UpgradeDB' implicitly has an 'any' type, but a better type may be inferred from usage

Resources (screenshots, code snippets etc.)


russellclark free answered 5 years ago


SOLVED. Downgraded to "idb": "^2.1.3", from latest version


FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Closed

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 8.8.0
  • Device: browser
  • Browser: chrome
  • OS: win 10
  • Provided sample code: No
  • Provided link: Yes