1
<body>
        <header>
            <% include templates/header.ejs %>
        </header>
            <% include templates/announcement.ejs %>
        <form>
            <br><input type="text" id="myInput" onkeyup="myFunction()" placeholder="Search a fort...">
        </form><br>
        <section id="placeList">
            <div class="placeListBackground" id="placeListGet">
             <ul id="placeCells">
                <% placeData.forEach(function(placeData) { %>
                    <div class="placeContainer <%= placeData.category %>" class><a href = "https://www.roblox.com/games/<%= placeData.placeid %>/-"><img src= "<%= placeData.placeicon %>" alt="<%= placeData.placename %>" align="left" width="178" height="100"><span><%= placeData.placename %></span><p><%= placeData.clan %></p><p>Playing: <%= placeData.playing %></p><p class="sCategory"><%= placeData.category %></p></a></div>
                <% }); %>
             </ul>
            </div>
        </section>
        <br><footer>Contact us: https://discord.gg/fMb5y7T</footer>
    </body>
    <% include templates/search.ejs %>

I've checked through and tested a bunch of different tags for ejs just in-case but I do not see why this is not working. It worked previously but there must be some issue I'm overlooking unless it is the fault of ejs?

2
  • 1
    From the doc, that's not how you include a file with ejs ejs.co/#install Commented Dec 12, 2019 at 22:01
  • Interesting. On my other computer it worked just fine but that did change something. Let me check it out more. Commented Dec 12, 2019 at 22:16

2 Answers 2

1

I think the problem is with the ejs tags.

You have wrote: <% include templates/file.ejs %>

And should be: <%- include ("templates/file.ejs") %>

At least I had same problem and solved that way, I hope is usefull. look for more info about ejs changes: https://github.com/RyanZim/EJS-Lint

Sign up to request clarification or add additional context in comments.

Comments

0

try downgrading or upgrading ejs package

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.