nmarus / node-ews

A simple JSON wrapper for the Exchange Web Services (EWS) SOAP API.
MIT License
116 stars 52 forks source link

How to use this package in Ionic 3? #59

Closed prasanthmpr closed 7 years ago

prasanthmpr commented 7 years ago

I am getting series of issues when i try to use this package in ionic 3. Please help me using this package in ionic 3.

kcastrotech commented 7 years ago

It would be helpful if we knew what issues you are having. Please include examples and the exact error messages.

prasanthmpr commented 7 years ago

WSSecurityCert.js:8 Uncaught TypeError: fs.readFileSync is not a function at Object. (WSSecurityCert.js:8) at Object. (WSSecurityCert.js:78) at webpack_require (bootstrap 63bcebc2c4bbed6f3585:19) at Object. (index.js:9) at webpack_require (bootstrap 63bcebc2c4bbed6f3585:19) at Object. (soap.js:11) at Object.module.exports.read (soap.js:94) at webpack_require (bootstrap 63bcebc2c4bbed6f3585:19) at Object. (index.js:3) at webpack_require (bootstrap 63bcebc2c4bbed6f3585:19)

prasanthmpr commented 7 years ago

After i replace require('fs') with require(fs-extra') in WSSecurityCert.js. I am getting this error and not able to solve it.

Uncaught TypeError: Cannot read property 'prototype' of undefined at patch (graceful-fs.js:166) at Object. (graceful-fs.js:27) at Object. (graceful-fs.js:262) at webpack_require (bootstrap 5f7152bc030c76d53941:19) at Object. (index.js:4) at webpack_require (bootstrap 5f7152bc030c76d53941:19) at Object. (WSSecurityCert.js:3) at Object. (WSSecurityCert.js:78) at __webpack_require__ (bootstrap 5f7152bc030c76d53941:19) at Object. (index.js:9)

kcastrotech commented 7 years ago

First of all, I'd suggest you leave fs as the package being used and find out why that isn't working. A quick google for "ionic3 fs.readFileSync is not a function" led me to https://forum.ionicframework.com/t/ionic2-with-electron/77644 which seems to have a solution. Try that.

kcastrotech commented 7 years ago

Were you able to get it working?

kcastrotech commented 7 years ago

Closing due to inactivity.