【问题标题】:ENOENT: no such file or directory - error in pugENOENT:没有这样的文件或目录 - 哈巴狗错误
【发布时间】:2017-07-16 12:19:22
【问题描述】:

当上传到 Heroku 时,它会抛出这个错误,而在 localhost 运行时没有错误。

这是浏览器消息:

这是我的 display.pug

extends ../LoginLayout/LoginLayout.pug
block content

- var createdAt = requser.local.profile.createdAt
script(type="text/javascript").
    $(document).ready(function() {
        var createdAt = Date.parse('!{createdAt}');            
        //- console.log(createdAt);
        $('.memberSince')[0].innerHTML = moment(createdAt).fromNow(true);
    });

.parallax-container.display
    .parallax
        img(src=requser.local.profile.herobg)
    .container.white-text.center
        img.circle(src=requser.local.profile.dp style='width: 200px;')
        h1 #{requser.local.name}
        h6 Member since #[span.memberSince #{createdAt}] | Lives in #{requser.local.profile.location} | #[strong 232222] points
        a.btn.btn-large.blue.darken-3.waves-amber.waves-effect.white-text(href='#') #[i.fa.fa-user-plus.left] Follow

【问题讨论】:

    标签: node.js express pug


    【解决方案1】:

    我自己解决了这个问题。

    我的文件层次结构:

    我正在使用: extends ../LoginLayout/LoginLayout.pug 而不是 extends ../loginLayout/loginLayout.pug。注意login 在存储时以小写字母开头。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-10-07
      • 1970-01-01
      • 2019-03-09
      • 2017-12-28
      • 2022-01-16
      • 2021-03-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多