ENOENT:没有这样的文件或目录-哈巴狗中的错误 [英] ENOENT: no such file or directory - error in pug
本文介绍了ENOENT:没有这样的文件或目录-哈巴狗中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当上传到Heroku时,它引发了我这个错误,而在本地主机上运行时却没有错误.
When uploaded to Heroku, it is throwing me this error, while no error when running at 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
推荐答案
我自己解决了这个问题.
I solved this myself.
我的文件层次结构:
,我正在使用:扩展../LoginLayout/LoginLayout.pug
,而不是扩展../loginLayout/loginLayout.pug
.请注意, login
从存储时的小写字母开始.
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.
这篇关于ENOENT:没有这样的文件或目录-哈巴狗中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文