【问题标题】:How do I fix the Implicit textOnly message that appears when starting an Express server?如何修复启动 Express 服务器时出现的 Implicit textOnly 消息?
【发布时间】:2013-08-21 03:05:16
【问题描述】:

使用node app.js 启动 Express 服务器时,我看到显示以下消息:

不推荐使用 scriptstyle 的隐式 textOnly。请改用script.style.

此消息是什么意思,我该如何解决?

【问题讨论】:

    标签: node.js express pug


    【解决方案1】:

    This issue 和 this pull request 详细讨论了该消息。基本上,您很快将不得不明确告诉 Jade,脚本只是文本。目前的方法:

     script
       var a = 2;
    

    已弃用。它将被替换为:

    script.
      var a = 2;
    

    因此,要修复此消息,您需要通过在 scriptstyle 之后添加一个点来明确表明该块是文本

    正如here 所述,这已被删除,以使 Jade 更易于学习并允许在块中使用 Jade 代码块。

    正如我上面提到的,这也适用于隐式style

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-19
      • 2012-04-04
      • 2021-10-24
      • 1970-01-01
      相关资源
      最近更新 更多