ENOENT:没有这样的文件或目录 - pug中的错误

问题描述:

当上传到Heroku时,它向我抛出此错误,而在本地主机上运行时没有错误。ENOENT:没有这样的文件或目录 - pug中的错误

下面是浏览器消息: enter image description here

这里是我的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 

我这个解决我自己。

我的文件层次:

This was my file hierarchy

和我所用: extends ../LoginLayout/LoginLayout.pug代替extends ../loginLayout/loginLayout.pug。请注意0​​从存储的小字母开始。