Estaba usando el método fetch post para publicar esta matriz de objetos en mi backend. Pero no sé por qué estoy recibiendo este error.
const inventory = [ { name: "phone", price: 1200, }, { name: "Laptop", price: 12000, }, { name: "I mac", price: 120000, }, ] fetch('localhost:5000/inventory', { method: 'POST', header: { 'content-type': 'application/json' }, body: JSON.stringify(inventory) })