Bug Report 🐛
npx create-video@latest fails during project creation in an environment where:
npm is configured to use a corporate npm proxy / mirror (for example JFrog Artifactory)
- direct access to
https://registry.npmjs.org is blocked or intercepted by the corporate network / proxy
The surprising part is that regular npm operations still work:
npm view remotion version --json succeeds
npm install for Remotion packages succeeds
So the failure seems specific to create-video, not to Remotion installation in general.
Reproduction
- Configure npm to use a corporate registry / npm proxy in
~/.npmrc
- Make sure direct access to
https://registry.npmjs.org is blocked or rewritten by the network
- Run:
- Choose
Blank
- Accept the default project name
Actual behavior
Project creation crashes with:
<anonymous_script>:1
<!-- ... -->
^
SyntaxError: Unexpected token '<', "<!-- ... " is not valid JSON
at JSON.parse (<anonymous>)
at getLatestRemotionVersion (.../node_modules/create-video/dist/latest-remotion-version.js:29:17)
In my case, the response body appears to be HTML / proxy output instead of npm metadata JSON.
Expected behavior
create-video should work in environments where npm itself is configured correctly to use a registry mirror/proxy.
At minimum, it should:
- respect npm registry configuration instead of hardcoding
registry.npmjs.org, or
- fail with a clearer error message if the latest version lookup cannot return valid JSON
Why I think this is a bug in create-video
The current source appears to hardcode the public npm registry:
packages/create-video/src/latest-remotion-version.ts
const req = http.get(
'https://registry.npmjs.org/remotion',
{
headers: {
accept:
'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*',
},
},
...
);
That means create-video bypasses:
npm config get registry
NPM_CONFIG_REGISTRY
- corporate npm mirrors / proxies
So even when npm view remotion version works, create-video can still fail.
Additional validation
In the same environment:
npm view remotion version --json
npm view @remotion/cli version --json
both succeed, and a plain npm install for Remotion dependencies succeeds as well.
This suggests the issue is the direct HTTP call in create-video, not the package availability.
Suggested fixes
Any of these would help:
- Resolve the latest version via npm config / npm registry instead of hardcoding
https://registry.npmjs.org
- Allow a CLI flag or env var to override the Remotion version lookup source
- Gracefully handle non-JSON responses and print a useful error message such as:
Failed to fetch the latest Remotion version from the registry.
Your network may block direct access to registry.npmjs.org.
Please configure a reachable registry or pass an explicit version.
- Optionally allow passing an explicit Remotion version so project scaffolding can continue offline / behind restricted networks
Environment
- macOS
- Node.js:
v22.19.0
- npm:
10.9.3
create-video: latest at the time of testing
- Network: corporate environment with proxy / traffic inspection and an npm registry mirror
Workaround
As a workaround, I can clone the template repo directly and then run npm install, which works:
git clone https://github.com/remotion-dev/template-empty.git my-video
cd my-video
npm install
So this looks fixable in create-video specifically.
Bug Report 🐛
npx create-video@latestfails during project creation in an environment where:npmis configured to use a corporate npm proxy / mirror (for example JFrog Artifactory)https://registry.npmjs.orgis blocked or intercepted by the corporate network / proxyThe surprising part is that regular npm operations still work:
npm view remotion version --jsonsucceedsnpm installfor Remotion packages succeedsSo the failure seems specific to
create-video, not to Remotion installation in general.Reproduction
~/.npmrchttps://registry.npmjs.orgis blocked or rewritten by the networkBlankActual behavior
Project creation crashes with:
<anonymous_script>:1 <!-- ... --> ^ SyntaxError: Unexpected token '<', "<!-- ... " is not valid JSON at JSON.parse (<anonymous>) at getLatestRemotionVersion (.../node_modules/create-video/dist/latest-remotion-version.js:29:17)In my case, the response body appears to be HTML / proxy output instead of npm metadata JSON.
Expected behavior
create-videoshould work in environments where npm itself is configured correctly to use a registry mirror/proxy.At minimum, it should:
registry.npmjs.org, orWhy I think this is a bug in
create-videoThe current source appears to hardcode the public npm registry:
packages/create-video/src/latest-remotion-version.tsThat means
create-videobypasses:npm config get registryNPM_CONFIG_REGISTRYSo even when
npm view remotion versionworks,create-videocan still fail.Additional validation
In the same environment:
both succeed, and a plain
npm installfor Remotion dependencies succeeds as well.This suggests the issue is the direct HTTP call in
create-video, not the package availability.Suggested fixes
Any of these would help:
https://registry.npmjs.orgEnvironment
v22.19.010.9.3create-video: latest at the time of testingWorkaround
As a workaround, I can clone the template repo directly and then run
npm install, which works:git clone https://github.com/remotion-dev/template-empty.git my-video cd my-video npm installSo this looks fixable in
create-videospecifically.