idb: EDGE/IE error SCRIPT1028: Expected identifier, string or number

error SCRIPT1028: Expected identifier, string or number

idb package: ā€œ^5.0.1ā€

Angular CLI: 9.0.6
Node: 12.16.1
OS: linux x64

Angular: 9.0.6
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.6
@angular-devkit/build-angular     0.900.6
@angular-devkit/build-optimizer   0.900.6
@angular-devkit/build-webpack     0.900.6
@angular-devkit/core              9.0.6
@angular-devkit/schematics        9.0.6
@angular/cdk                      9.1.2
@angular/flex-layout              9.0.0-beta.29
@angular/material                 9.1.2
@ngtools/webpack                  9.0.6
@schematics/angular               9.0.6
@schematics/update                0.900.6
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2

Error only with EDGE/IE (included latest version). It is necessary to deactivate the code below to avoid the error.

 this.iDB = await openDB(environment.idb, 1, {
   upgrade(db) {
      db.createObjectStore('piece');
      db.createObjectStore('lines');
    }
 });

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 20 (7 by maintainers)

Most upvoted comments

I’m having the same issue in edge. Even with babel transpile on (as mentioned above)

  `  rules: [
  {
    test: /\.(js|jsx)$/,
    exclude: /node_modules\/(?![idb])/,
    loaders: [ {
      loader: "babel-loader",
     
    }]
  },
  {
    test: /(expose\.js)$/,
    exclude: /node_modules\/(?![idb])/,
    loaders: ["expose-loader?Components", {
      loader: "babel-loader"
    }]
  },
  `

image

image

Any other workarounds for this?