简体   繁体   中英

ENOENT: no such file or directory - error in pug

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM