nodebb-plugin-ns-awards icon indicating copy to clipboard operation
nodebb-plugin-ns-awards copied to clipboard

Error on creating a new award

Open ShlomiPorush opened this issue 2 years ago • 2 comments

Error did occur: {"errno":-2,"code":"ENOENT","syscall":"copyfile","path":"/run/nodebb/node_modules/nodebb-plugin-ns-awards/public/uploads/award-dcc3c7ac-1659-42d0-a988-9ab0cab7db46.jpg","dest":"/app/code/public/uploads/awards/award-dcc3c7ac-1659-42d0-a988-9ab0cab7db46.jpg"}

image

ShlomiPorush avatar Jul 25 '22 20:07 ShlomiPorush

Check your NodeBB installation. For some reason, the Plugin can not write the newly uploaded reward. You should check the user behind your NodeBB and if they can write files here:

  • /run/nodebb/node_modules/nodebb-plugin-ns-awards/public/uploads/
  • /app/code/public/uploads/awards/

NicolasSiver avatar Jul 25 '22 20:07 NicolasSiver

got the same issue when I use the plugin on localhost on Linux.

Server answers:

{
    "errno": -2,
    "code": "ENOENT",
    "syscall": "copyfile",
    "path": "/home/frozen_byte/Projects/nodebb-plugin-ns-awards/public/uploads/award-2611e152-4610-4c52-b7ad-53ac5b3e3bb2.png",
    "dest": "/home/frozen_byte/Projects/NodeBB/public/uploads/awards/award-2611e152-4610-4c52-b7ad-53ac5b3e3bb2.png"
}

So I checked and the "awards" folder was missing, created it manually and it worked.

Anyway the missing folder should create automatically IMHO

Frozen-byte avatar Jan 13 '23 18:01 Frozen-byte