Uncaught SyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function

前端 未结 5 826
暗喜
暗喜 2020-12-11 01:05

Hello when I run this project in Developer mode (grunt server) https://github.com/kennethlynne/generator-angular-xl everything is ok but when I run it in production mode (gr

5条回答
  •  借酒劲吻你
    2020-12-11 01:34

    In addition to the correct answers, this could also be a bug in FireFox in some specific scenarios.

    We had this error message on the machine of one single user. In the JavaScript file there was a use strict line below the method that throwed this error (which should not be affected by this)

    It happened to be an issue on FireFox Version 45.9.0 (and maybe older versions, as well). Updating Firefox to the most current version (currently 52.4) solved the issue.

提交回复
热议问题