question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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');
    }
 });

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Schuer84commented, Apr 20, 2020

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?

0reactions
jakearchibaldcommented, Jan 6, 2021

I’ve added a statement of browser support https://github.com/jakearchibald/idb#browser-support

Read more comments on GitHub >

github_iconTop Results From Across the Web

Edge: SCRIPT1028: Expected identifier, string or number
It appears (surprisingly) that Edge doesn't support property rest yet, which is unfortunate but then it was officially added only in ES2018.
Read more >
[Bug Report] Not work in Edge, error:'SCRIPT1028 ... - GitHub
It says: "SCRIPT1028: SCRIPT1028: Expected identifier, string or number", pointing to my main.js on the line where webpacked version of ...
Read more >
Error - Expected identifier, string - Material Design for Bootstrap
**Actual behavior** Vue fails to load cause script error [Error: SCRIPT1028: SCRIPT1028: Expected identifier, string or number].
Read more >
SOLUTION: SCRIPT1028: Expected identifier, string or number
There are 2 common ways to trigger the SCRIPT1028: Expected identifier, string or number JavaScript error in earlier versions of Internet ...
Read more >
SCRIPT1028: expected identifier, string or number IE 11, script1028 ...
There are 2 common ways to trigger the SCRIPT1028: Expected identifier, string or number JavaScript error in earlier versions of Internet Explorer.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found