node-wpapi icon indicating copy to clipboard operation
node-wpapi copied to clipboard

Outdated Superagent dep causing error for serverless functions

Open dyontaistaton opened this issue 3 years ago • 0 comments

I'm not a pro, and need a little help with this. I'm trying to use this package for a Nuxt site with it being hosted on Vercel. Within the serverless functions' logs I keep getting this error

ERROR  require is not a function
at Object.<anonymous> (node_modules_dev/wpapi/node_modules/formidable/lib/incoming_form.js:3:0)
at __webpack_require__ (webpack/bootstrap:25:0)
at Object.<anonymous> (node_modules_dev/wpapi/node_modules/formidable/lib/index.js:1:0)
at __webpack_require__ (webpack/bootstrap:25:0)
at Object.<anonymous> (node_modules_dev/wpapi/node_modules/superagent/lib/node/index.js:8:0)
at __webpack_require__ (webpack/bootstrap:25:0)
at Object.<anonymous> (node_modules_dev/wpapi/superagent/http-transport.js:6:0)
at __webpack_require__ (webpack/bootstrap:25:0)
at Object.<anonymous> (node_modules_dev/wpapi/superagent/index.js:4:0)
at __webpack_require__ (webpack/bootstrap:25:0)

Check This Issue with formidable a dep of superagent

dyontaistaton avatar Jun 04 '22 22:06 dyontaistaton