Skip to content

Plunk is not a constructor #2

Open

Description

@awdr74100

螢幕擷取畫面 2023-10-23 154902

repo: https://github.com/awdr74100/plunk-demo

I found that someone also raised this issue on discord, and they all happened to use Nuxt (Nitro) to build the backend. I can't confirm which side the problem is.

It would be great if this could be fixed! Any help is greatly appreciated!

Activity

  1. awdr74100 commented on Oct 23, 2023

    @awdr74100
    Author

    Hi, I think the problem comes from the fact that the module is based on CommonJS instead of ESM, so Nuxt (Nitro) and other projects with the "type": "module" attribute cannot be loaded smoothly.

    A simple fix is:

    import Plunk from "@plunk/node";
    
    const key = "..."
    const plunk = new Plunk.default(key); // but typescript will prompt an error
  2. driaug commented on Nov 20, 2023

    @driaug
    Member

    Hey there! Sorry for missing this issue!

    We are in the process of rewriting some of our open-source components so this issue will be resolved quite soon!

  3. jasongitmail commented on Aug 12, 2024

    @jasongitmail

    This should probably be highlighted in the README. Spent time troubleshooting it too. Thanks for the fix @awdr74100 Works well with that

  4. ash-vd commented on Jun 19, 2025

    @ash-vd

    This is still an issue I spent more time on then I'd like to admit 😅

  5. chris-ldgk commented on Aug 4, 2025

    @chris-ldgk

    +1, still an issue for me when trying to bundle @plunk/node with bun. Works in the dev server, crashes when running the bundle.
    Works with the fix above however.

  6. Micnubinub commented on Feb 6, 2026

    @Micnubinub

    Any update? I'm still getting the issue

  7. driaug commented on Feb 6, 2026

    @driaug
    Member

    Any update? I'm still getting the issue

    This library is no longer maintained as it is impossible for me as a solo-founder to maintain all integration. It was a basic API wrapper in the first place without any functionality, just call the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions