Skip to content

create-video: Respect npm registry config for corporate proxy support#6899

Merged
JonnyBurger merged 1 commit intoremotion-dev:mainfrom
bskang-v6x:fix/create-video-respect-npm-registry
Mar 23, 2026
Merged

create-video: Respect npm registry config for corporate proxy support#6899
JonnyBurger merged 1 commit intoremotion-dev:mainfrom
bskang-v6x:fix/create-video-respect-npm-registry

Conversation

@bskang-v6x
Copy link
Copy Markdown
Contributor

Summary

  • Read the user's configured npm registry via npm config get registry instead of hardcoding registry.npmjs.org
  • Falls back to the default public registry if the config command fails
  • Handles both http and https registry URLs
  • Adds a clear error message when the registry returns non-JSON responses (e.g. corporate proxy HTML pages)

Closes #6888

Test plan

  • npm config set registry https://registry.npmjs.orgnpx create-video works as before
  • npm config set registry http://localhost:4873 (Verdaccio) → uses the local registry
  • With an unreachable registry → shows the new descriptive error message instead of SyntaxError: Unexpected token

🤖 Generated with Claude Code

…ing registry.npmjs.org

Read the user's configured npm registry via `npm config get registry`
so that create-video works behind corporate proxies and npm mirrors.
Falls back to the default public registry if the command fails.

Also adds a clear error message when the registry returns non-JSON
(e.g. an HTML proxy page), guiding users to configure their registry.

Closes remotion-dev#6888

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment Mar 23, 2026 9:46am
remotion Ready Ready Preview, Comment Mar 23, 2026 9:46am

Request Review

Copy link
Copy Markdown
Contributor

@pullfrog pullfrog bot left a comment

Choose a reason for hiding this comment

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

LGTM. The implementation is clean and addresses issue #6888 well:

  • getRegistry() safely reads npm config get registry with a 10s timeout and falls back gracefully
  • Both http and https registries are supported via protocol detection
  • The error message is actionable and points users to the correct fix

One minor suggestion: The catch block on line 62 catches JSON parse errors, but this could also be a different kind of failure (though unlikely since the network call already succeeded). The current message is reasonable for the proxy case described in #6888.

Pullfrog  | Fix it ➔View workflow runpullfrog.com𝕏

@JonnyBurger JonnyBurger merged commit 0b4abf8 into remotion-dev:main Mar 23, 2026
18 checks passed
@JonnyBurger
Copy link
Copy Markdown
Member

Thank you!

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.

create-video hardcodes registry.npmjs.org and fails behind corporate npm proxies

2 participants