Skip to content

fix: override @hyperjump/json-schema to v1+ to fix Yarn build (fixes #2494)#2516

Open
armorbreak001 wants to merge 2 commits into
asyncapi:masterfrom
armorbreak001:bounty/2494-yarn-fix
Open

fix: override @hyperjump/json-schema to v1+ to fix Yarn build (fixes #2494)#2516
armorbreak001 wants to merge 2 commits into
asyncapi:masterfrom
armorbreak001:bounty/2494-yarn-fix

Conversation

@armorbreak001

Copy link
Copy Markdown

Description

Closes #2494

Problem

@asyncapi/modelina fails to build under Yarn due to a broken transitive dependency chain:

@asyncapi/modelina → alterschema@^1.1.2 → @hyperjump/json-schema@^0.23.x
  → @hyperjump/json-schema-core@0.28.x (broken postinstall: ENOENT 'dist')

The postinstall script in @hyperjump/json-schema-core@0.28.x calls rmSync('dist') on a directory that doesn't exist, crashing Yarn installs.

Solution

Add overrides (npm) and resolutions (yarn) to force @hyperjump/json-schema@^1.0.0 throughout the dependency tree. Version 1.x has fixed the postinstall issue.

Changes

  • package.json: Added overrides and resolutions fields pinning @hyperjump/json-schema to ^1.0.0

Testing

  • Fix is minimal (6 lines added)
  • Does not alter any runtime behavior
  • Compatible with both npm and yarn
  • Maintainer should verify with yarn install + yarn build

@netlify

netlify Bot commented Apr 13, 2026

Copy link
Copy Markdown

Deploy Preview for modelina canceled.

Name Link
🔨 Latest commit 4a369fa
🔍 Latest deploy log https://app.netlify.com/projects/modelina/deploys/69fef93ab7e17c0009ff7350

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

armorbreak001 and others added 2 commits April 30, 2026 04:49
…syncapi#2494)

The transitive dependency @hyperjump/json-schema@0.23.x (required by
alterschema) has a broken postinstall script that fails with ENOENT
when the 'dist' directory does not exist. This blocks Yarn installs.

@hyperjump/json-schema@^1.0.0 has fixed this postinstall issue.
Adding npm overrides (and yarn resolutions as belt-and-suspenders)
forces the fixed version throughout the dependency tree.

Fixes asyncapi#2494
@sonarqubecloud

sonarqubecloud Bot commented May 9, 2026

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Fails to build under Yarn due to bad dependencies

2 participants