LoginSignup
2
0

More than 5 years have passed since last update.

Node.js + Express4.xでejs-localsモジュールが使えなかった

Last updated at Posted at 2018-12-27

エラー発生

Webアプリケーションを作成中にモジュールエラーが出ました。原因はejs-localsモジュールでした。

原因

ejs-localsを使えるのはExpress3.xまでとのこと。
私が使っているのはExpress4.16.0なので、そりゃ使えない。

解決法

Express4.xでも使えるejs-mateがあるのでこれを使えば良さそう。
使い方もejs-localsと全く同じだと思います。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0