Skip to content

🎥 Make videos programmatically with React

npx broken in npm 8 in monorepo - use pnpx

Jonny Burger08d99efa6e02
diff --git a/packages/it-tests/src/lambda/lambda-integration.test.ts b/packages/it-tests/src/lambda/lambda-integration.test.ts
index 14c99adb4f..410823db6e 100644
--- a/packages/it-tests/src/lambda/lambda-integration.test.ts
+++ b/packages/it-tests/src/lambda/lambda-integration.test.ts
@@ -1,22 +1,22 @@
import execa from "execa";
import path from "path";
-test("Should be able to call npx remotion lambda", async () => {
- const task = await execa("npx", ["remotion", "lambda"], {
+test("Should be able to call pnpx remotion lambda", async () => {
+ const task = await execa("pnpx", ["remotion", "lambda"], {
cwd: path.join(process.cwd(), "..", "example"),
});
expect(task.stdout).toContain("Available commands");
});
test("Should be able to get user policy without authentication", async () => {
- const task = await execa("npx", ["remotion", "lambda", "policies", "user"], {
+ const task = await execa("pnpx", ["remotion", "lambda", "policies", "user"], {
cwd: path.join(process.cwd(), "..", "example"),
});
expect(task.stdout).toContain("iam:GetUser");
});
test("Should be able to get role policy without authentication", async () => {
- const task = await execa("npx", ["remotion", "lambda", "policies", "role"], {
+ const task = await execa("pnpx", ["remotion", "lambda", "policies", "role"], {
cwd: path.join(process.cwd(), "..", "example"),
});
expect(task.stdout).toContain("s3:ListAllMyBuckets");
diff --git a/packages/it-tests/src/rendering/frame-accuracy.test.ts b/packages/it-tests/src/rendering/frame-accuracy.test.ts
index 83b1f3f2d8..5a18497ed4 100644
--- a/packages/it-tests/src/rendering/frame-accuracy.test.ts
+++ b/packages/it-tests/src/rendering/frame-accuracy.test.ts
@@ -17,7 +17,7 @@ const getMissedFramesforCodec = async (codec: "mp4" | "webm") => {
// render the VideoTesting example (which contains the Framer composition embedded with <Video>) to an image
// sequence which can be checked for accuracy
await execa(
- "npx",
+ "pnpx",
[
"remotion",
"render",
diff --git a/packages/it-tests/src/rendering/render-scale.test.ts b/packages/it-tests/src/rendering/render-scale.test.ts
index 8818e662df..d29e321251 100644
--- a/packages/it-tests/src/rendering/render-scale.test.ts
+++ b/packages/it-tests/src/rendering/render-scale.test.ts
@@ -12,7 +12,7 @@ beforeEach(() => {
test("Should be able to render video with scale 2", async () => {
const task = execa(
- "npx",
+ "pnpx",
[
"remotion",
"render",
diff --git a/packages/it-tests/src/rendering/rendering.test.ts b/packages/it-tests/src/rendering/rendering.test.ts
index 9b66699f44..18fd6bb437 100644
--- a/packages/it-tests/src/rendering/rendering.test.ts
+++ b/packages/it-tests/src/rendering/rendering.test.ts
@@ -12,7 +12,7 @@ beforeEach(() => {
test("Should be able to render video", async () => {
const task = execa(
- "npx",
+ "pnpx",
[
"remotion",
"render",
@@ -42,7 +42,7 @@ test("Should be able to render video", async () => {
test("Should fail to render out of range CRF", async () => {
const task = await execa(
- "npx",
+ "pnpx",
[
"remotion",
"render",
@@ -68,7 +68,7 @@ test("Should fail to render out of range frame when range is a number", async ()
const out = outputPath.replace(".mp4", "");
const task = await execa(
- "npx",
+ "pnpx",
[
"remotion",
"render",
@@ -91,7 +91,7 @@ test("Should fail to render out of range frame when range is a number", async ()
test("Should fail to render out of range frame when range is a string", async () => {
const task = await execa(
- "npx",
+ "pnpx",
[
"remotion",
"render",
@@ -112,7 +112,7 @@ test("Should fail to render out of range frame when range is a string", async ()
test("Should render a ProRes video", async () => {
const out = outputPath.replace(".mp4", ".mov");
const task = await execa(
- "npx",
+ "pnpx",
[
"remotion",
"render",
@@ -143,7 +143,7 @@ test("Should render a still image if single frame specified", async () => {
const outDir = outputPath.replace(".mp4", "");
const outImg = path.join(outDir, "element-2.png");
const task = await execa(
- "npx",
+ "pnpx",
[
"remotion",
"render",
@@ -172,7 +172,7 @@ test("Should render a still image if single frame specified", async () => {
test("Should be able to render a WAV audio file", async () => {
const out = outputPath.replace("mp4", "wav");
const task = execa(
- "npx",
+ "pnpx",
["remotion", "render", "src/index.tsx", "audio-testing", out],
{
cwd: path.join(process.cwd(), "..", "example"),
@@ -197,7 +197,7 @@ test("Should be able to render a WAV audio file", async () => {
test("Should be able to render a MP3 audio file", async () => {
const out = outputPath.replace("mp4", "mp3");
const task = execa(
- "npx",
+ "pnpx",
["remotion", "render", "src/index.tsx", "audio-testing", out],
{
cwd: path.join(process.cwd(), "..", "example"),
@@ -223,7 +223,7 @@ test("Should be able to render a MP3 audio file", async () => {
test("Should be able to render a AAC audio file", async () => {
const out = outputPath.replace("mp4", "aac");
const task = execa(
- "npx",
+ "pnpx",
["remotion", "render", "src/index.tsx", "audio-testing", out],
{
cwd: path.join(process.cwd(), "..", "example"),
@@ -248,7 +248,7 @@ test("Should be able to render a AAC audio file", async () => {
test("Should render a video with GIFs", async () => {
const task = await execa(
- "npx",
+ "pnpx",
["remotion", "render", "src/index.tsx", "gif", "--frames=0-47", outputPath],
{
cwd: path.join(process.cwd(), "..", "example"),
@@ -269,7 +269,7 @@ test("Should render a video with Offline Audio-context", async () => {
const out = outputPath.replace(".mp4", ".mp3");
const task = await execa(
- "npx",
+ "pnpx",
["remotion", "render", "src/index.tsx", "offline-audio-buffer", out],
{
cwd: path.join(process.cwd(), "..", "example"),
@@ -289,7 +289,7 @@ test("Should render a video with Offline Audio-context", async () => {
test("Should fail to render an audio file that doesn't have any audio inputs", async () => {
const out = outputPath.replace(".mp4", ".mp3");
const task = await execa(
- "npx",
+ "pnpx",
["remotion", "render", "src/index.tsx", "ten-frame-tester", out],
{
cwd: path.join(process.cwd(), "..", "example"),
@@ -307,7 +307,7 @@ test("Should fail to render an audio file that doesn't have any audio inputs", a
test("Should render a still that uses the staticFile() API", async () => {
const out = outputPath.replace(".mp4", ".png");
const task = await execa(
- "npx",
+ "pnpx",
["remotion", "still", "src/index.tsx", "static-demo", out, "--log=verbose"],
{
cwd: path.join(process.cwd(), "..", "example"),
@@ -321,7 +321,7 @@ test("Should render a still that uses the staticFile() API", async () => {
test("Dynamic duration should work", async () => {
const randomDuration = Math.round(Math.random() * 18 + 2);
const task = await execa(
- "npx",
+ "pnpx",
[
"remotion",
"render",
diff --git a/packages/lambda/remotionlambda.zip b/packages/lambda/remotionlambda.zip
index 380cee87e3..518a7e6555 100644
Binary files a/packages/lambda/remotionlambda.zip and b/packages/lambda/remotionlambda.zip differ