Ju99ernaut/grapesjs-template-manager

loading assets

bovealexandre opened this issue · 1 comments

Hi I have a problem with after the get {id} request I have this data that I return

contentPage[0] {
  id: '4d6f445d-91a3-46fb-b2f2-ac3dffb2bec9',
  name: 'Default-4d6f445',
  template: false,
  thumbnail: '',
  description: 'No description',
  updated_at: 1657007673270,
  styles: [],
  pages: [ { frames: [Array], type: 'main', id: 'GzoJdYqIWmsEB007' } ],
  assets: [
    'http://localhost:3000/uploaded/2d1e4ac0-71f7-434c-87ac-4ffd3569693b.webp',
    'http://localhost:3000/uploaded/63559c56-0fc5-4bbf-90cc-e7770007ebdd.webp'
  ]
}

but after the return I have this error

[Error: ENOENT: no such file or directory, unlink 'E:\my-boilerplate\public\uploaded\[object Object]'] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'unlink',
  path: 'E:\\my-boilerplate\\public\\uploaded\\[object Object]'
}

and I don't know why

the project is made with next.js and Tailwind and that error breaks Tailwind in Grapes

I'm not sure, but it seems at some point you're passing an asset object instead of its id, so it's stringified as [object Object].