I recieved an message error please help me

<!-- include Header Starts Here -->
<%- include('include/_header') %>
<!-- include Header Ends Here -->

<!-- Main Section Starts Here -->
<main id="site-main">
    <div class="container">
        <div class="box-nav d-flex-justify-between">
            <div class="filter">
                <a href="/"><i class="fas fa-angle-double-left"></i> All Users </a>
            </div>
        </div>

        <div class="form-title text-center">
            <h2 class="text-dark">Update User</h2>
            <span class="text-light">Use the below form to Update an account</span>
        </div>

                <!-- Form Handling Starts Here -->
                <form method="POST" id="update_user">
                    <div class="new_user">
        
                        <div class="form-group">
                            <label for="name" class="radio-label">Name</label>
                            <input type="hidden" name="id" value="<%= user._id%>">
                            <input type="text" name="name" value="<%= user.name %>" placeholder="Name">
                        </div>
        
                        <div class="form-group">
                            <label for="email" class="radio-label">Email</label>
                            <input type="email" name="email" value="<%= user.email %>" placeholder="Email">
                        </div>
        
                        <div class="form-group">
                            <label for="sex" class="radio-label">Sex</label>
                            <div class="radio inline">
                                <input type="radio" id="radio-2" name="sex" value="Male" <%= user.sex == 'Male'? 'checked':"%>>
                                <label for="radio-2" class="radio-label">Male</label>
                            </div>
                            <div class="radio inline">
                                <input type="radio" id="radio-3" name="sex" value="Female" <%= user.sex == 'Female'? 'checked':"%>>
                                <label for="radio-3" class="radio-label">Female</label>
                            </div>
                        </div>
        
                        <div class="form-group">
                            <label for="status"  class="radio-label">Status</label>
                            <div class="radio inline">
                                <input type="radio" id="radio-4" name="status" value="Active" <%= user.status == 'Active'? 'checked':"%>>
                                <label for="radio-4" class="radio-label">Active</label>
                            </div>
                            <div class="radio inline">
                                <input type="radio" id="radio-5" name="status" value="Inactive" <%= user.status == 'Inactive'? 'checked':"%>>
                                <label for="radio-5" class="radio-label">Inactive</label>
                            </div>
                        </div>
                            
                        <div class="form-group">
                            <button type="submit" class="btn text-dark update">Save</button>
                        </div>
        
                    </div>
                </form>
            <!-- Form Handling Ends Here -->
    </div>
</main>		
<!-- Main Section Starts Here -->

<!-- include Footer Starts Here -->
<%- include('include/_footer') %>
<!-- include Footer Ends Here -->

Blockquote
SyntaxError: Invalid or unexpected token in C:\Users\HP\Desktop\user-management_crud\views\update_user.ejs while compiling ejs

If the above error is not helpful, you may want to try EJS-Lint:

Or, if you meant to create an async function, pass async: true as an option.
at new Function ()
at Template.compile (C:\Users\HP\Desktop\user-management_crud\node_modules\ejs\lib\ejs.js:673:12)
at Object.compile (C:\Users\HP\Desktop\user-management_crud\node_modules\ejs\lib\ejs.js:398:16)
at handleCache (C:\Users\HP\Desktop\user-management_crud\node_modules\ejs\lib\ejs.js:235:18)
at tryHandleCache (C:\Users\HP\Desktop\user-management_crud\node_modules\ejs\lib\ejs.js:274:16)
at exports.renderFile [as engine] (C:\Users\HP\Desktop\user-management_crud\node_modules\ejs\lib\ejs.js:491:10)
at View.render (C:\Users\HP\Desktop\user-management_crud\node_modules\express\lib\view.js:135:8)
at tryRender (C:\Users\HP\Desktop\user-management_crud\node_modules\express\lib\application.js:657:10)
at Function.render (C:\Users\HP\Desktop\user-management_crud\node_modules\express\lib\application.js:609:3)
at ServerResponse.render (C:\Users\HP\Desktop\user-management_crud\node_modules\express\lib\response.js:1039:7)

It says you have a syntax error. If you install an EJS extension for your editor, it might help you find it.

I already installed a extension for ej but cant figured out the error

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.