hps / heartland-nodejs

Heartland's node.js SDK for connecting to our Portico Payment Gateway.
GNU General Public License v2.0
10 stars 12 forks source link

Problem including heartland-nodejs in parse-server cloud code #20

Closed thailey01 closed 7 years ago

thailey01 commented 7 years ago

Hello,

I have been working on adding heartland-nodejs to my parse-server app. I'm trying to make payments in my parse-server cloud code but when I require('heartland-nodejs') my server fails with: node_modules/node-expat/build/Release/node_expat.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 46. This version of Node.js requires NODE_MODULE_VERSION 57. Please try re-compiling or re-installing the module (for instance, usingnpm rebuildornpm install).

slogsdon commented 7 years ago

Hi @thailey01. Thanks for the report!

From the error message, it looks to be related to node-expat's build process. Is your environment caching the node_modules directory? Has your environment recently changed/updated the installed version of the Node.JS runtime?

thailey01 commented 7 years ago

Ok, I got it working by installing node devDependencies electron-prebuilt, electron-rebuild, node-gyp