DEV Community

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

Collapse
 
abhinavsingh1995 profile image
abhinavsingh1995 • Edited

adding players is not working.It is not giving any error.
I tried to add player, once i open the add player page/form AND some player information it shows this after submitting
{
"errno":-2,
"code":"ENOENT",
"syscall":"open",
"path":"public/assets/img/user.png"
}
and when i went back to homepage no player is added.

Collapse
 
mohamadalibrahim profile image
mohamad-alibrahim

i have encounterd in the same issue, how it would be solved?

Collapse
 
mdagley profile image
Melissa Dagley

This happened to me when I didn't have the directory created for the image.

Collapse
 
achowba profile image
Prince

This could be from the addPlayer.js function or the path to the store the image does not exist, kindly crosscheck and try again.