Report this

What is the reason for this report?

Express Ejs - error variable undefined

Posted on February 8, 2022

I was following this tutorial https://www.digitalocean.com/community/tutorials/how-to-use-ejs-to-template-your-node-application however I receive this error variable is not defined



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @cam zd,

On which step did you receive the error variable is not defined? Additionally, have you tried following the tutorial from start to finish again after the error was received?

One other thing, have you followed the tutorial and done everything in it step by step? I’m asking these questions as usually, there was something small missing which is hard to tell unless you follow the tutorial to the letter.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Dark mode is coming soon.