globalpayments / node-sdk

GNU General Public License v2.0
23 stars 27 forks source link

Is This Library Compatible With NextJS? #74

Open devwilliamy opened 1 month ago

devwilliamy commented 1 month ago

I'm trying to use Heartland with my backend on NextJS but I'm getting this error: I'm on Next 14.1, Node 21.6.2, NPM 10.2.4.

Import trace for requested module:
./src/app/api/heartland/credit/route.ts
 ⨯ ./node_modules/globalpayments-api/lib/src/index.js:19:4
Module not found: Can't resolve '../netsuite/set-timeout-polyfill'      

https://nextjs.org/docs/messages/module-not-found

I know I'm able to run it on a regular Node/Express server because I spun one up quickly and it worked fine. However, when I try to run it through an endpoint on NextJS, it doesn't work.

Has anyone been able to make it work with NextJS?

I've already tried reaching out to developers@heartland.us but haven't heard back yet.

devwilliamy commented 1 month ago

Update: Have to use it in pages router, seems to work fine on 3.8.0