Skip to content

Run npm package instantly (Try on RunKit alternative) #2314

@romansp

Description

@romansp

Describe the feature

One thing I truly miss from npmjs.org is "Try on RunKit" feature. It came in clutch for me quite a few times: quickly explore package API, create minimal repro, run code against different versions to verify a bug.

"RunKit" has been dead for quite some time https://github.com/orgs/community/discussions/141424 and even when it was around it still had a room for improvement: better code highlighting, autocomplete, type checking.

For instance, Cloudflare releasing Dynamic Workers resurfaced some of bring back RunKit discussions here: https://x.com/_ashleypeacock/status/2036846134790943049. So it's not forgotten and has demand.

Possible solutions

npmjs.dev

Would like to give a shout-out to @amio as they made an alternative https://npmjs.dev/. It has 3 runtimes available: QuickJS (WASM), Browser (iframe + import map) and Cloudflare's Dynamic Workers. Supports running specific versions: https://npmjs.dev/vue@3.5.9. And you can even pass custom snippet via #code hash parameter https://npmjs.dev/vue#code=JYWwDg9gTgLgBAKjgQwM5wG4FcCmcBmUEIcA5NjqQFBUDGEAdqhADY4B0LEA5gBSkAJHCy4EiJBmBAAPdgBMcGUgEogA.

CodeSandbox/StackBlitz

These support creating projects on-demand programatically via their SDK. You also get full TypeScript-aware editor but startup time won't be great.

In-house solution

Recreate "Try on RunKit" ourselves and fully own this feature. We'll have full control over runtime, code editor, etc.

Additional information

  • Would you be willing to help implement this feature?

Final checks

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededneeds discussionAn idea that needs more discussion to understand the scope and impact.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions