Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

fix: add nodejs runtime to routes that import auth/users.server

Brad Barbin6c21e5e7c3f3
diff --git a/apps/erp/app/routes/_public+/callback.tsx b/apps/erp/app/routes/_public+/callback.tsx
index 008665c53e..85fa640c62 100644
--- a/apps/erp/app/routes/_public+/callback.tsx
+++ b/apps/erp/app/routes/_public+/callback.tsx
@@ -25,6 +25,10 @@ import { Alert, AlertDescription, AlertTitle, VStack } from "@carbon/react";
import { LuTriangleAlert } from "react-icons/lu";
import { path } from "~/utils/path";
+export const config = {
+ runtime: "nodejs",
+};
+
export async function loader({ request }: LoaderFunctionArgs) {
const authSession = await getAuthSession(request);
diff --git a/apps/erp/app/routes/_public+/login.tsx b/apps/erp/app/routes/_public+/login.tsx
index 2689a9d7b9..455d8ecc3b 100644
--- a/apps/erp/app/routes/_public+/login.tsx
+++ b/apps/erp/app/routes/_public+/login.tsx
@@ -41,6 +41,10 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | Login" }];
};
+export const config = {
+ runtime: "nodejs",
+};
+
export async function loader({ request }: LoaderFunctionArgs) {
const authSession = await getAuthSession(request);
if (authSession && (await verifyAuthSession(authSession))) {
diff --git a/apps/mes/app/routes/_public+/callback.tsx b/apps/mes/app/routes/_public+/callback.tsx
index 609cae4e8b..a8b6fc6d59 100644
--- a/apps/mes/app/routes/_public+/callback.tsx
+++ b/apps/mes/app/routes/_public+/callback.tsx
@@ -31,6 +31,10 @@ import {
import { LuTriangleAlert } from "react-icons/lu";
import { path } from "~/utils/path";
+export const config = {
+ runtime: "nodejs",
+};
+
export async function loader({ request }: LoaderFunctionArgs) {
const authSession = await getAuthSession(request);
diff --git a/apps/mes/app/routes/_public+/login.tsx b/apps/mes/app/routes/_public+/login.tsx
index ff47efeacd..816d8deae8 100644
--- a/apps/mes/app/routes/_public+/login.tsx
+++ b/apps/mes/app/routes/_public+/login.tsx
@@ -35,6 +35,10 @@ export const meta: MetaFunction = () => {
return [{ title: "Carbon | Login" }];
};
+export const config = {
+ runtime: "nodejs",
+};
+
export async function loader({ request }: LoaderFunctionArgs) {
const authSession = await getAuthSession(request);
if (authSession && (await verifyAuthSession(authSession))) {
diff --git a/apps/starter/app/routes/_public+/callback.tsx b/apps/starter/app/routes/_public+/callback.tsx
index 94d5df0a29..46402e3177 100644
--- a/apps/starter/app/routes/_public+/callback.tsx
+++ b/apps/starter/app/routes/_public+/callback.tsx
@@ -31,6 +31,10 @@ import {
import { LuTriangleAlert } from "react-icons/lu";
import { path } from "~/utils/path";
+export const config = {
+ runtime: "nodejs",
+};
+
export async function loader({ request }: LoaderFunctionArgs) {
const authSession = await getAuthSession(request);
diff --git a/apps/starter/app/routes/_public+/login.tsx b/apps/starter/app/routes/_public+/login.tsx
index ff47efeacd..1c497fc2b2 100644
--- a/apps/starter/app/routes/_public+/login.tsx
+++ b/apps/starter/app/routes/_public+/login.tsx
@@ -31,6 +31,10 @@ import { LuCircleAlert } from "react-icons/lu";
import { path } from "~/utils/path";
+export const config = {
+ runtime: "nodejs",
+};
+
export const meta: MetaFunction = () => {
return [{ title: "Carbon | Login" }];
};
diff --git a/apps/university/app/routes/_auth+/callback.tsx b/apps/university/app/routes/_auth+/callback.tsx
index 46c3412cda..12269ee352 100644
--- a/apps/university/app/routes/_auth+/callback.tsx
+++ b/apps/university/app/routes/_auth+/callback.tsx
@@ -31,6 +31,10 @@ import {
import { LuTriangleAlert } from "react-icons/lu";
import { path } from "~/utils/path";
+export const config = {
+ runtime: "nodejs",
+};
+
export async function loader({ request }: LoaderFunctionArgs) {
const authSession = await getAuthSession(request);
diff --git a/apps/university/app/routes/_auth+/login.tsx b/apps/university/app/routes/_auth+/login.tsx
index 416d0b3ca9..86eca15eef 100644
--- a/apps/university/app/routes/_auth+/login.tsx
+++ b/apps/university/app/routes/_auth+/login.tsx
@@ -31,6 +31,10 @@ import { LuCircleAlert } from "react-icons/lu";
import { path } from "~/utils/path";
+export const config = {
+ runtime: "nodejs",
+};
+
export const meta: MetaFunction = () => {
return [{ title: "Carbon | Login" }];
};
diff --git a/packages/jobs/trigger/user-admin.ts b/packages/jobs/trigger/user-admin.ts
index 8b833d994c..e0914edf70 100644
--- a/packages/jobs/trigger/user-admin.ts
+++ b/packages/jobs/trigger/user-admin.ts
@@ -1,7 +1,8 @@
import { task } from "@trigger.dev/sdk/v3";
import { z } from "zod";
-import { Result, getAppUrl, getCarbonServiceRole } from "@carbon/auth";
+import type { Result } from "@carbon/auth";
+import { getAppUrl, getCarbonServiceRole } from "@carbon/auth";
import { deactivateUser } from "@carbon/auth/users.server";
import { InviteEmail } from "@carbon/documents/email";
import { resend } from "@carbon/lib/resend.server";