NumminorihSF / ami-io

Use node.js or io.js to manage Asterisk through AMI
MIT License
30 stars 16 forks source link

Can't resolve 'fs' with Angular 7 #23

Closed drenda closed 5 years ago

drenda commented 5 years ago

Hi, I'm trying to use this library in my Angular 7 project. Unfortunately I've a compiling error:

ERROR in ./node_modules/ami-io/index.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\Daniele\Documents\workspaceAngularJS\optix\node_modules\ami-io'

Is there a way to make it work with Angular?

Thanks

NumminorihSF commented 5 years ago

Hi, it's a server-side library. If you check the lib's code, you'll find that there is another nodejs' internal module (net), so I don't think it's easy to use this lib in browser. And I also don't think that it's a good idea to send ami's creds to anyone's browser.

drenda commented 5 years ago

Ok gotcha. Thanks. Well actually the idea was connecting to a local pbx to make a simple click2call action.