ENOENT: no such file or directory - error in pug

百般思念 提交于 2019-12-14 03:19:11

问题


When uploaded to Heroku, it is throwing me this error, while no error when running at localhost.

Here is browser message:

Here is my 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

回答1:


I solved this myself.

My file hierarchy:

and I was using: extends ../LoginLayout/LoginLayout.pug instead of extends ../loginLayout/loginLayout.pug. notice the login starts from small letter as it was stored.



来源:https://stackoverflow.com/questions/42459442/enoent-no-such-file-or-directory-error-in-pug

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!