Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

252
Views
"Objeto de error {mensaje: "La clave de API proporcionada no es válida", tipo: "authentication_error"}"

Estoy haciendo el tutorial de youtube "Ecommerce Web Shop - Build & Deploy an Amazing App | React.js, Commerce.js, Stripe" y este error apareció cuando estaba enviando un nuevo objeto de producto desde Commerce.js. (minuto 45:50) Tengo el código correspondiente:

 import React, {useState, useEffect } from 'react'; import { commerce } from './lib/commerce' import {Products, Navbar } from './components' // to create a full function web shell app, we need a // full api that is stored on commerce import const App = () => { //new state const [products, setProducts] = useState([]); // fetch data from the commerce instance // fetch the products immediatelly on the aplication load const fetchProducts = async () => { // this is going to return a promise that we have to // await to see what is inside of that promise const { data } = await commerce.products.list(); // now the products are going to be populated setProducts(data); } /* this is to call the fetch product function and set products to the state, the empty list means that it's only going to render at the start */ useEffect(() => { fetchProducts(); },[]); console.log(products); return ( <div> <Navbar/> <Products/> </div> ); } export default App;

[Debería haber impreso el objeto en la consola, pero en cambio tengo el error]

(Error) https://i.stack.imgur.com/Symbp.png

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!