using pipedrive node module in angular application

2019-09-01 16:00发布

问题:

I know this has been asked many times, I'm still struggling to get this done! I'm trying to use Pipedrive client API in my Angular App. Suggested approach on npm site is to use require('pipedrive') but Greatest require doesn't work straightway in angular app. Additionally many posts suggests not to use it. next I tried :

import * as Pipedrive from './../../../node_modules/pipedrive/lib/Pipedrive.js';
 var pipedrive = new Pipedrive.Client('xxxxxxxxxxxxxxx', { strictMode: true });

but shis give me error :

ERROR in ./node_modules/fetch/lib/fetch.js
Module not found: Error: Can't resolve 'dns' in 'C:\Sangeeta\Study Projects\Hello-World\node_modules\fetch\lib'

Can any body point out what I'm doing wrong here?