You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
leads to following error message: Error: ENOENT, open D:\ZHAW\BA\IoT_Base\lib\views\layouts\D:\ZHAW\BA\IoT_Base\lib\plugins\IoT_HelloWorld\views\layouts\main.handlebars'
Seems to me, as if the path is handled relative even though it's obviously absolute.
The text was updated successfully, but these errors were encountered:
Yeah, you'll need to take it up with them, all Express does is pass the res.render arguments to express-handlebars. It's up to it to resolve those paths properly.
@ChiperSoft is correct in how Express is working :) We basically use path.resolve to resolve your views directory (which is where "D:\ZHAW\BA\IoT_Base\lib\views\layouts" came from). Then after that, we take all the arguments to res.render and look at the first one ("D:\ZHAW\BA\IoT_Base\lib\plugins\IoT_HelloWorld\views\layouts\main.handlebars"). Since it is an absolute path, we just do nothing and pass it to your view engine and let it process all this information :)
Following call:
leads to following error message:
Error: ENOENT, open D:\ZHAW\BA\IoT_Base\lib\views\layouts\D:\ZHAW\BA\IoT_Base\lib\plugins\IoT_HelloWorld\views\layouts\main.handlebars'
Seems to me, as if the path is handled relative even though it's obviously absolute.
The text was updated successfully, but these errors were encountered: