hey,
im using shipfast saas template together with some remotion code from other projects. the remotion code worked by itself, but since i merged it with shipfast, it stopped working.
error from browser console (error in webstorm is in the file):
Module not found: Can't resolve '@remotion/compositor-linux-arm64-gnu'
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/@remotion/renderer/dist/index.js
./node_modules/@remotion/lambda/dist/api/download-media.js
./node_modules/@remotion/lambda/dist/index.js
./deploy/regions.ts
./libs/remotion/get-render-or-make.ts
./app/api/render/route.ts
hydration-error-info.js:63 ./node_modules/@remotion/studio/dist/components/get-zod-if-possible.js:41:1
Module not found: Can't resolve '@remotion/zod-types'
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/@remotion/studio/dist/components/EditorContexts.js
./node_modules/@remotion/studio/dist/Studio.js
./node_modules/@remotion/studio/dist/previewEntry.js
./node_modules/@remotion/cli/dist/studio.js
./node_modules/@remotion/cli/dist/index.js
./node_modules/@remotion/lambda/dist/cli/index.js
./node_modules/@remotion/lambda/dist/internals.js
./node_modules/@remotion/lambda/dist/index.js
./deploy/regions.ts
./libs/remotion/get-render-or-make.ts
./app/api/render/route.ts
hydration-error-info.js:63 ./node_modules/esbuild/lib/main.d.ts
Module parse failed: Unexpected token (1:7)
> export type Platform = 'browser' | 'node' | 'neutral'
| export type Format = 'iife' | 'cjs' | 'esm'
| export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'text' | 'ts' | 'tsx'
my code:
api/render/route.ts```
import { getRenderOrMake } from "@/libs/remotion/get-render-or-make";
import {NextResponse} from 'next/server'
import {createRouteHandlerClient} from '@supabase/auth-helpers-nextjs'
import {cookies} from 'next/headers'
export async function POST(req) {
console.log("inside render api")
const supabase = createRouteHandlerClient({ cookies });
const { data } = await supabase.auth.getSession();
const { session } = data;
if (session) {
const body = await req.json();
// const body = JSON.parse(req.body);
try {
console.log(body)
const { inputId, compId, inputProps } = body;
console.log("success1")
const prog = await getRenderOrMake({ inputId, compId, inputProps });
// res.status(200).json(prog);
return NextResponse.json(prog, { status: 200 });
} catch (e) {
console.error(e);
return NextResponse.json(
{ error: "Something went wrong" },
{ status: 500 }
);
}
} else {
// Not Signed in
NextResponse.json({ error: "Not signed in" }, { status: 401 });
}
}
RenderHandler.ts is in file