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

143
Views
El inicio de sesión de Discord en mi sitio web no funciona. ¿Por qué?

Quiero implementar un inicio de sesión de Discord en un sitio web. Pero tengo algunos problemas. Cuando inicio la aplicación con el node oauth.js en la terminal, no aparece ningún error. Pero luego, cuando hago clic en autorizar en el sitio web de Discord, aparece el siguiente error:

 TypeError: fetch is not a function at ...\oauth.js:49:5 at Layer.handle [as handle_request] (...\node_modules\express\lib\router\layer.js:95:5) at next (...\node_modules\express\lib\router\route.js:137:13) at Route.dispatch (...\node_modules\express\lib\router\route.js:112:3) at Layer.handle [as handle_request] (...\node_modules\express\lib\router\layer.js:95:5) at ...\node_modules\express\lib\router\index.js:281:22 at Function.process_params (...\node_modules\express\lib\router\index.js:335:12) at next (...\node_modules\express\lib\router\index.js:275:10) at ...\node_modules\body-parser\lib\read.js:130:5 at invokeCallback (...\node_modules\raw-body\index.js:224:16)

No puedo encontrar el error en mi código... Tiene algo que ver con fetch

Mi código

¿Algunas ideas?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Al mirar el violín, no puedo ver ningún problema, excepto la forma en que ha formateado su importación de fetch .

const fetch = require('node-fetch');

Prueba algo así en lugar de importarlo.

about 4 years ago · Juan Pablo Isaza Report
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!