Skip to content

Pin @polkadot-api/json-rpc-provider to 0.2.0 to fix npm build#7

Merged
todortodorovic merged 1 commit into
paritytech:mainfrom
illegalcall:fix/json-rpc-provider-override
Jun 13, 2026
Merged

Pin @polkadot-api/json-rpc-provider to 0.2.0 to fix npm build#7
todortodorovic merged 1 commit into
paritytech:mainfrom
illegalcall:fix/json-rpc-provider-override

Conversation

@illegalcall

Copy link
Copy Markdown
Contributor

Issue

npm run build (and therefore pg deploy) fails out of the box:

"isResponse" is not exported by @polkadot-api/json-rpc-provider

npm hoists json-rpc-provider@0.0.1 (pulled in transitively, no isResponse export) to the root of node_modules, while @polkadot-api/json-rpc-provider-proxy@0.4.0 imports isResponse without declaring a dependency, so it resolves the wrong copy. The repo only ships a bun.lock, and bun happens to hoist the working 0.2.0, which is why bun builds pass while every npm build fails.

Fix

Add an npm override pinning @polkadot-api/json-rpc-provider to 0.2.0 (the latest stable, and the version polkadot-api@2.1.6 already expects). Verified locally with a red-green setup: clean install fails before the change and builds cleanly after. The legacy consumers of 0.0.1 only import types from it, so the override is safe at runtime.

Fixes paritytech/playground-app#323

npm resolves json-rpc-provider 0.0.1 at the root, which lacks the
isResponse export used by @polkadot-api/json-rpc-provider-proxy, so
`npm run build` fails. The override forces 0.2.0 everywhere.

Fixes paritytech/playground-app#323
@illegalcall

Copy link
Copy Markdown
Contributor Author

@todortodorovic Can you please review?

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.

2 participants