View render error from Routes

I’m writing my codes with es6 standarts and transpile with babel cli. But i got an error when res.render() method use from routes middlewares.
My server codes :
ekran resmi 2019-01-09 00 53 31

And my route middleware codes :
ekran resmi 2019-01-09 00 55 28

Error :
ekran resmi 2019-01-09 01 01 00
Although I was setting path but it looking in PROJECT_ROOT/views directory

The interesting thing is:
If i don’t use route middleware, it works! For example:
ekran resmi 2019-01-09 00 59 59

Author: Fantashit

1 thought on “View render error from Routes

Comments are closed.