Skip to content

🎥 Make videos programmatically with React

use path.resolve instead of require.resolve

Jonny Burgerf91e46a2ecaf
diff --git a/packages/docs/docs/ssr.md b/packages/docs/docs/ssr.md
index 32252d4fdc..8a712e3eea 100644
--- a/packages/docs/docs/ssr.md
+++ b/packages/docs/docs/ssr.md
@@ -23,6 +23,7 @@ Follow this commented example to see how to render a video:
```tsx twoslash
import { bundle } from "@remotion/bundler";
+import path from "path";
import { getCompositions, renderMedia } from "@remotion/renderer";
const start = async () => {
@@ -31,7 +32,7 @@ const start = async () => {
// Create a webpack bundle of the video.
// You only have to do this once, you can reuse the bundle.
- const bundleLocation = await bundle(require.resolve("./src/index"));
+ const bundleLocation = await bundle(path.resolve("./src/index"));
// Parametrize the video by passing arbitrary props to your component.
const inputProps = {