lula / ngx-soap

Simple SOAP client for Angular
MIT License
66 stars 61 forks source link

Angular 11 - Error: Module not found: Error: Can't resolve 'assert' #111

Open NatsumeKaito opened 3 years ago

NatsumeKaito commented 3 years ago

Hello, i just installed ngx-soap with all the dependences but when i start my app with ng serve i get this error:

./node_modules/ngx-soap/ivy_ngcc__/fesm2015/ngx-soap.js:9:0-28 - Error: Module not found: Error: Can't resolve 'assert' in 'node_modules\ngx-soap__ivy_ngcc\fesm2015' [ng] BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. [ng] This is no longer the case. Verify if you need this module and configure a polyfill for it. [ng] If you want to include a polyfill, you need to: [ng] - add a fallback 'resolve.fallback: { "assert": require.resolve("assert/") }' [ng] - install 'assert' [ng] If you don't want to include a polyfill, you can use an empty module like this: [ng] resolve.fallback: { "assert": false }

my package json dependencies:

"dependencies": { "@angular/common": "~12.0.1", "@angular/core": "~12.0.1", "@angular/forms": "~12.0.1", "@angular/platform-browser": "~12.0.1", "@angular/platform-browser-dynamic": "~12.0.1", "buffer": "^5.7.1", "concat-stream": "^1.6.2", "core-js": "^2.6.12", "crypto-js": "^3.3.0", "events": "^3.3.0", "lodash": "^4.17.21", "ngx-soap": "^0.7.0", "rxjs": "~6.6.0", "sax": "^1.2.4", "stream": "^0.0.2", "tslib": "^2.0.0", "uuid": "^3.4.0", "zone.js": "~0.11.4" }

touchsky2018 commented 2 years ago

had you fix this problem @NatsumeKaito

MonneratRJ commented 1 year ago

I'm having the same issue here on 2023...

seyfer commented 8 months ago

this project was a wrapper around https://github.com/vpulim/node-soap just use node-soap directly if you need to convert XML response to JSON use https://github.com/NaturalIntelligence/fast-xml-parser

seyfer commented 7 months ago

@NatsumeKaito I have updated this package. please check 0.11.0 or 0.12.0 version

https://github.com/lula/ngx-soap/issues/125#issuecomment-1898767558