1

Requiring the axios package with const axios = require('axios'); is throwing an Uncaught ReferenceError: require is not defined message.

I currently have Node version 12.16.3. Before that, I had version 14.2.0, and I was still getting the same message. Any help on how to fix this error message would be great. Thanks in advance!

Greeen
  • 33
  • 4
  • Chance are you're using it on browser / client side. See this https://stackoverflow.com/questions/19059580/client-on-node-uncaught-referenceerror-require-is-not-defined – Tuan Anh Tran May 15 '20 at 22:55

0 Answers0