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.

error in iOs 9 safari : `SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode.`

See original GitHub issue
  • I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

repro:

What is expected?

The website should work in iOs 9 safari

What is actually happening?

blank page with an error: SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode.

Other relevant information

This works well with vuepress 0.14.10, but not with 1.0.0-alpha.48

  • My VuePress version is lower and euqal than 1.0.0-alpha.47:

    • VuePress version: 1.0.0-alpha.48
    • OS: macOs 10.13.6
    • Node.js version: 12.1.0
    • Browser version: safari iOs 9
    • Is this a global or local install? local
    • Which package manager did you use for the install? npm
    • Does this issue occur when all plugins are disabled?
  • My VuePress version is higher than 1.0.0-alpha.47, the following is the output of npx vuepress info in my VuePress project:

Environment Info:

System: OS: macOS High Sierra 10.13.6 CPU: (8) x64 Intel® Core™ i7-2600 CPU @ 3.40GHz Binaries: Node: 12.1.0 - /usr/local/bin/node Yarn: Not Found npm: 6.9.0 - /usr/local/bin/npm Browsers: Chrome: Not Found Firefox: 66.0.5 Safari: 12.1.1 npmPackages: @vuepress/core: 1.0.0-alpha.48 @vuepress/theme-default: 1.0.0-alpha.48 vuepress: ^1.0.0-alpha.48 => 1.0.0-alpha.48 npmGlobalPackages: vuepress: Not Found

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
francoisromaincommented, Oct 21, 2019

@ulivz I upgraded to the latest version and the problem is still here:

Environment Info:

  System:
    OS: macOS High Sierra 10.13.6
    CPU: (8) x64 Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
  Binaries:
    Node: 12.12.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.12.0 - /usr/local/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 69.0.3
    Safari: 13.0.2
  npmPackages:
    @vuepress/core:  1.2.0 
    @vuepress/theme-default:  1.2.0 
    vuepress: ^1.2.0 => 1.2.0 
  npmGlobalPackages:
    vuepress: Not Found
0reactions
tretapeycommented, Dec 9, 2019

Hello, I haven’t tried this yet but I’m pretty sure that your browserslist is not including IOs 9, and there when it bundles is not supported.

Your actual browserslits configuration is: https://browserl.ist/?q=>1%25

I don’t think that giving support for IOs 9 is needed though.

Also see if you need to compile your node_modules folder as well, check this issue as reference https://github.com/babel/babel/issues/9712

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError: Unexpected keyword 'const'. Const declarations ...
But the project can't run in iPhone IOS9 Safari, it has a compile error: WX20190320-135448@2x. The code that caused the error:
Read more >
bundle.js:1 SyntaxError: Unexpected keyword 'const'. Const ...
js:1 SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode. My webpack.config.json has this rule: rules: ...
Read more >
error in iOs 9 safari : `SyntaxError: Unexpected keyword 'const ...
What is actually happening? blank page with an error: SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode.
Read more >
SyntaxError: missing = in const declaration - JavaScript | MDN
The JavaScript exception "missing = in const declaration" occurs when a const declaration was not given a value in the same statement (like ......
Read more >
Vue-cli and iOS 9 SyntaxError: Unexpected keyword 'const ...
On iOS 9 there is an error: SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode. The const keyword ...
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