<small id='NwGer'></small><noframes id='NwGer'>

  • <tfoot id='NwGer'></tfoot>

    <legend id='NwGer'><style id='NwGer'><dir id='NwGer'><q id='NwGer'></q></dir></style></legend>

    <i id='NwGer'><tr id='NwGer'><dt id='NwGer'><q id='NwGer'><span id='NwGer'><b id='NwGer'><form id='NwGer'><ins id='NwGer'></ins><ul id='NwGer'></ul><sub id='NwGer'></sub></form><legend id='NwGer'></legend><bdo id='NwGer'><pre id='NwGer'><center id='NwGer'></center></pre></bdo></b><th id='NwGer'></th></span></q></dt></tr></i><div id='NwGer'><tfoot id='NwGer'></tfoot><dl id='NwGer'><fieldset id='NwGer'></fieldset></dl></div>
      • <bdo id='NwGer'></bdo><ul id='NwGer'></ul>

        Visual Studio 任务运行程序“SyntaxError:在严格模式下

        时间:2023-05-28
              <legend id='ElHQR'><style id='ElHQR'><dir id='ElHQR'><q id='ElHQR'></q></dir></style></legend>

              <i id='ElHQR'><tr id='ElHQR'><dt id='ElHQR'><q id='ElHQR'><span id='ElHQR'><b id='ElHQR'><form id='ElHQR'><ins id='ElHQR'></ins><ul id='ElHQR'></ul><sub id='ElHQR'></sub></form><legend id='ElHQR'></legend><bdo id='ElHQR'><pre id='ElHQR'><center id='ElHQR'></center></pre></bdo></b><th id='ElHQR'></th></span></q></dt></tr></i><div id='ElHQR'><tfoot id='ElHQR'></tfoot><dl id='ElHQR'><fieldset id='ElHQR'></fieldset></dl></div>
              • <bdo id='ElHQR'></bdo><ul id='ElHQR'></ul>
                <tfoot id='ElHQR'></tfoot>
                  <tbody id='ElHQR'></tbody>

                <small id='ElHQR'></small><noframes id='ElHQR'>

                  本文介绍了Visual Studio 任务运行程序“SyntaxError:在严格模式下使用 const."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  将 Win10 Pro/VS2015 与网站"项目(不是 asp.net,基本网站)一起使用

                  当尝试保存/重新加载 gulpfile.js 时,我收到错误消息(来自 Task Runner Explorer/输出)

                  <块引用>

                  语法错误:在严格模式下使用 const.

                  在目前的情况下,gulp-changed"令人窒息

                  我查看了可用的答案和评论:

                  • 在我的情况下,环境路径 $(PATH) 已经包含节点的全局安装,但我需要将它移到 $(DevEnvDir) 路径之前,以便它获得优先权.

                    (在提供正确答案后添加,感谢@baao)

                    解决方案

                    VS 似乎安装(然后使用)旧版本的节点,这就是任务运行器中断构建的原因.

                    转到 工具 >选项>项目和解决方案 >外部 Web 工具 并将正确的路径添加到您的节点版本(使用 which node 查找路径).

                    感谢:https://github.com/sindresorhus/gulp-imagemin/issues/178#issuecomment-218131138

                    Using Win10 Pro / VS2015 with a 'website' project (not asp.net, basic website)

                    When attempt to save/reload gulpfile.js I receive the error message (from Task Runner Explorer/output)

                    SyntaxError: Use of const in strict mode.

                    In the present case it is choking on 'gulp-changed'

                    I have looked through the answers and comments available:

                    • SyntaxError: Use of const in strict mode
                    • SyntaxError: Use of const in strict mode?

                      1. I have updated my version of node to the latest: 6.10.30
                      2. I have cleaned the cache (npm cache clean -f)
                      3. I have used 'which node' to determine that node is pointing to the installation of the latest install.
                      4. "n" does not want to install on Windows (?)


                    In my case the environment path, $(PATH) already include the global install of node but I needed to move it ahead of the $(DevEnvDir) paths so that it would get priority.

                    (added after correct answer provided, thanks @baao)

                    解决方案

                    VS seems to install (and then use) an old version of node, which is why the task runner is breaking the build.

                    Go to Tools > Options > Projects and Solutions > External Web Tools and add the correct path to your node version (find the path with which node).

                    Credits to: https://github.com/sindresorhus/gulp-imagemin/issues/178#issuecomment-218131138

                    这篇关于Visual Studio 任务运行程序“SyntaxError:在严格模式下使用 const."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Uglify SyntaxError: Unexpected token: punc ()) 下一篇:我可以使用具有多个源和多个目标的 Gulp 任务吗

                  相关文章

                  最新文章

                  <small id='wXMrT'></small><noframes id='wXMrT'>

                    <legend id='wXMrT'><style id='wXMrT'><dir id='wXMrT'><q id='wXMrT'></q></dir></style></legend><tfoot id='wXMrT'></tfoot>
                    <i id='wXMrT'><tr id='wXMrT'><dt id='wXMrT'><q id='wXMrT'><span id='wXMrT'><b id='wXMrT'><form id='wXMrT'><ins id='wXMrT'></ins><ul id='wXMrT'></ul><sub id='wXMrT'></sub></form><legend id='wXMrT'></legend><bdo id='wXMrT'><pre id='wXMrT'><center id='wXMrT'></center></pre></bdo></b><th id='wXMrT'></th></span></q></dt></tr></i><div id='wXMrT'><tfoot id='wXMrT'></tfoot><dl id='wXMrT'><fieldset id='wXMrT'></fieldset></dl></div>

                      • <bdo id='wXMrT'></bdo><ul id='wXMrT'></ul>