Uncaught SyntaxError: Use of const in strict mode

I’m having this problem with Android 4.4 or newer. It gives that error on vendor.js.

In this method:

function getSafeUnicode(c) {
  const unicode = `000${c.charCodeAt(0).toString(16)}`.slice(-4);
  return `\\u${unicode}`;

With Android 7 and 8 it works well.

Anyone know how to fix it?

I’m using cordova 7.0.0 and this:

Ionic Framework: 3.9.2
Ionic App Scripts: 3.1.9
Angular Core: 5.2.9
Angular Compiler CLI: 5.2.9
Node: 8.11.1
OS Platform: macOS High Sierra
Navigator Platform: MacIntel
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Did you used to have a much older version of Node installed?

I’ve just upgraded to 10.0.0 and I still have the same problem.

I’ve just found that it’s a problem with dropbox npm module. I’ll contact with them to let they know that bug.

Thanks anyway!

1 Like

Be aware of this: Has anyone tried Node 10.0 yet?