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

145
Views
Discord login on my website is not working. Why?

I want to implement a Discord login on a website. But I have a few issues. When I start the application with node oauth.js in the terminal, no error popped up. But then, when I click on authorize on the Discord website, the following error pops up:

 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)

I can't find the error in my code... It's something to do with fetch

My code

Any ideas?

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

0

From looking at the fiddle, I can't see any problem except the way you have formatted your fetch import.

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

Try something like that instead of importing it.

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!