Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cannot instantiate new EasyPostClient in Nextjs 13 #439

Open
oliviergabison opened this issue Mar 25, 2024 · 2 comments
Open

[Bug]: Cannot instantiate new EasyPostClient in Nextjs 13 #439

oliviergabison opened this issue Mar 25, 2024 · 2 comments
Labels
triage Issue is being researched

Comments

@oliviergabison
Copy link

Software Version

7.2.0

Language Version

20.10.0

Operating System

Mac OS 13.3.1

What happened?

  1. Imported easypost-node library
  2. Attempt to create new EasyPostClient via
    const client = new EasyPostClient(process.env.EASYPOST_API_KEY!);
  3. Upon building, error is thrown that .TypeError: a is not a function
  4. After commenting out the code, the app builds fine

What was expected?

To be able to build the app while using EasyPostClient

Sample Code

const client = new EasyPostClient(process.env.EASYPOST_API_KEY!);

Relevant logs

No response

@oliviergabison oliviergabison added the triage Issue is being researched label Mar 25, 2024
@nwithan8
Copy link
Member

Hello @oliviergabison , thanks for reaching out and reporting this! We are currently investigating the issue, and will keep you updated.

@nwithan8
Copy link
Member

Hello @oliviergabison , just wanted to update you on our findings so far.

We've been able to recreate your issue trying to import the library into a Next.js 13 project, and have discovered the issue lies in the easypost-node > superagent > formidable > hexoid dependency chain. Specifically, formidable does not seem to be importing hexoid properly.

In our research, we came across another library that seems to be facing a similar issue, if any of the conversation there might be able to help you get unblocked: pubnub/javascript#352. In the meantime, we'll continue investigating if there's anything we need/can fix with our library specifically.

Thanks again for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issue is being researched
Projects
None yet
Development

No branches or pull requests

2 participants