0

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?

Sangeeta
  • 388
  • 5
  • 19
  • 1
    I guess this library does not have type definition (*.d.ts) see [this](https://hackernoon.com/how-to-use-javascript-libraries-in-angular-2-apps-ff274ba601af) – Vikas Apr 08 '18 at 06:48
  • @Vikas , above does not solves my problem. Typescript is not complaining about library. when compiling via webpack I get above error – Sangeeta Apr 09 '18 at 05:40

0 Answers0