Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

阮老师,demo4里面的路径会报错,改成“./template.html”才行。 #4

Closed
colgin opened this issue Aug 15, 2017 · 2 comments

Comments

@colgin
Copy link

colgin commented Aug 15, 2017

No description provided.

@ruanyf
Copy link
Owner

ruanyf commented Aug 15, 2017

我是在项目的根目录下执行,你进入了 demos目录了。

@LeonWuV
Copy link

LeonWuV commented Oct 10, 2018

根目录下执行命令是不是为 node demos/04.js ;

您可以打印一下 __dirname ,还是在demos的下面;

我认为不管你是在哪里执行,nodejs最后的位置一定是在被执行的文件所在的路径里;

所以我觉得需要改为 __dirname + '/template.html' 更加合理

如果说的不对,望阮老师指正,谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants