Realm function npm soap module issue

Hi ,
I am trying to use the realm function . I want to use the npm soap module for web service calls. I have written one function and imported all the npm dependencies also related to soap module but when I am trying to use it function its throwing me error.
code :-
exports = function(arg){
const soapRequest = require(‘soap’);
};

error which i am getting -

ran on Tue Apr 06 2021 15:57:58 GMT+0530 (India Standard Time)
took 1.260830491s
error:
failed to execute source for ‘node_modules/soap/index.js’: FunctionError: failed to execute source for ‘node_modules/soap/lib/soap.js’: FunctionError: failed to execute source for ‘node_modules/soap/lib/client.js’: FunctionError: failed to execute source for ‘node_modules/soap/lib/http.js’: FunctionError: failed to execute source for ‘node_modules/request/index.js’: FunctionError: failed to execute source for ‘node_modules/request/request.js’: FunctionError: failed to execute source for ‘node_modules/http-signature/lib/index.js’: FunctionError: failed to execute source for ‘node_modules/http-signature/lib/signer.js’: FunctionError: failed to execute source for ‘node_modules/jsprim/lib/jsprim.js’: FunctionError: failed to execute source for ‘node_modules/verror/lib/verror.js’: FunctionError: failed to execute source for ‘node_modules/core-util-is/lib/util.js’: TypeError: Cannot access member ‘isBuffer’ of undefined
at node_modules/core-util-is/lib/util.js:111:20(155)

soap module works perfectly in my local machine.
Can someone assist me to understand what is the problem with realm function for soap module.

very thankful for any kid of help.

Hi @sumit_kumar2

Welcome to MongoDB community.

Its possible that this module dependencies is not yet supported in realm functions.

Dependencies are still beta and therefore it is not supporting all js requirements.

How did you upload it?

Will you be able to use a rest service to call http request and pipe those soap calls via a service?

Thanks
Pavel

Thanks Pavel for your reply.
How ever I was able to use the easy-soap-request npm module which fixed my issue.

Thanks.

1 Like

Sumit Kumar, What are you talking about?