Skip to content

🎥 Make videos programmatically with React

create-video: Install dependencies during project setup

JonnyBurger8abef222e27c
diff --git a/packages/create-video/src/init.ts b/packages/create-video/src/init.ts
index 4d451dc4e2..2a2bfc17a7 100644
--- a/packages/create-video/src/init.ts
+++ b/packages/create-video/src/init.ts
@@ -215,6 +215,12 @@ export const init = async () => {
}
}
+ Log.info('Installing dependencies...');
+ await execa.command(getInstallCommand(pkgManager), {
+ cwd: projectRoot,
+ stdio: 'inherit',
+ });
+
if (!isInsideGitRepo) {
await getGitStatus(projectRoot);
}
@@ -237,7 +243,6 @@ export const init = async () => {
Log.info(' ' + chalk.blue(`cd ${cdToFolder}`));
}
- Log.info(' ' + chalk.blue(getInstallCommand(pkgManager)));
Log.info(' ' + chalk.blue(getDevCommand(pkgManager, selectedTemplate)));
Log.info('');
Log.info('To render a video, run:');
@@ -254,16 +259,6 @@ export const init = async () => {
}),
),
);
- Log.info(
- ' ' +
- chalk.blue(
- makeHyperlink({
- text: 'remotion.dev/prompts',
- url: 'https://www.remotion.dev/prompts',
- fallback: 'https://www.remotion.dev/prompts',
- }),
- ),
- );
Log.info();
Log.info('Remotion is free for teams of up to 3.');
Log.info(
diff --git a/packages/create-video/src/pkg-managers.ts b/packages/create-video/src/pkg-managers.ts
index 8187a6754b..0e8fc84a88 100644
--- a/packages/create-video/src/pkg-managers.ts
+++ b/packages/create-video/src/pkg-managers.ts
@@ -80,6 +80,8 @@ export const getInstallCommand = (manager: PackageManager) => {
if (manager === 'nub') {
return `nub install`;
}
+
+ throw new TypeError('unknown package manager');
};
const getStartCommand = (manager: PackageManager) => {