sendinblue / APIv3-nodejs-library

SendinBlue's API v3 Node.js Library
ISC License
101 stars 47 forks source link

Error Module not found: Can't resolve 'ApiClient' in ... #67

Closed Phyxable closed 4 years ago

Phyxable commented 4 years ago

I just plugged the documentation code in to import the API. But i am getting this error called "Module not found : Can't resolve APiClient". i am not even using webpack. Please help.

pislarm commented 4 years ago

@Phyxable Did you maybe managed to resolve this problem, I'm getting same with no webpack. Thanks!

dineshrawat11 commented 4 years ago

Did you get any solution of this problem?

pislarm commented 4 years ago

nope

mckennapaul27 commented 4 years ago

I've been grappling with this for a week but have finally had a breakthrough and it's working fine now.

Unfortunately, it looks like you'll have to edit webpack to make it work. Not ideal at all and I'm not a fan of having to do this just to make a package work but it is what it is.

I'm using Nextjs and the only way I have got it to work is by adding this to next.config.js

webpack: (config, options) => { config.module.rules.push({ parser: { amd: false } }) return config; },

Additionally my package.json is

"sib-api-v3-sdk": "github:sendinblue/APIv3-nodejs-library",

Hope this helps one of you guys.