DEV Community

Discussion on: Build a simple app using Node JS and MySQL.

Collapse
 
zzrez profile image
zzrez

I just completed this useful tutorial, thanks. In the process I had to solve some bugs which may be because versions of packages, eg express, have changed.

This bug (frequently mentioned below): "SyntaxError: Unexpected identifier". This is due to use of "<% include partials/header.ejs %>" at the top of the ejs files. If this is replaced by the original html of header.ejs, all works. So the required inclusion format seems to have changed for Express 4.x to:- "<%- include ('partials/header') %>"

Then there are various places with "title: Welcome to Socka | View Players" or similar, the value "Welcome to Socka | View Players" needs enclosing in single or double quotes.

Finally, the add form works if the directory for images, /public/assets/img, is first created.

Hope this helps. Great tutorial!