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.

refactor: try running trigger/axios/react-pdf related package in nodejs runtime

Brad Barbin97240e5f9968
diff --git a/apps/carbon/app/jobs/autodesk-poll.server.ts b/apps/carbon/app/jobs/autodesk-poll.server.ts
index 60e9c72c3c..c560816c76 100644
--- a/apps/carbon/app/jobs/autodesk-poll.server.ts
+++ b/apps/carbon/app/jobs/autodesk-poll.server.ts
@@ -8,6 +8,8 @@ import { upsertModelUpload } from "~/modules/shared";
const supabaseClient = getSupabaseServiceRole();
+export const config = { runtime: "nodejs" };
+
const job = triggerClient.defineJob({
id: "autodesk-poll",
name: "Poll Autodesk for Translation Progress",
diff --git a/apps/carbon/app/jobs/autodesk-upload.server.ts b/apps/carbon/app/jobs/autodesk-upload.server.ts
index e0adc4c94d..51c7f8159a 100644
--- a/apps/carbon/app/jobs/autodesk-upload.server.ts
+++ b/apps/carbon/app/jobs/autodesk-upload.server.ts
@@ -11,6 +11,8 @@ import {
import { getSupabaseServiceRole } from "~/lib/supabase";
import { triggerClient } from "~/lib/trigger.server";
+export const config = { runtime: "nodejs" };
+
const supabaseClient = getSupabaseServiceRole();
const job = triggerClient.defineJob({
diff --git a/apps/carbon/app/jobs/post-transaction.server.ts b/apps/carbon/app/jobs/post-transaction.server.ts
index 8aecf77b7a..a5269d8a49 100644
--- a/apps/carbon/app/jobs/post-transaction.server.ts
+++ b/apps/carbon/app/jobs/post-transaction.server.ts
@@ -5,6 +5,8 @@ import { getSupabaseServiceRole } from "~/lib/supabase";
import { triggerClient } from "~/lib/trigger.server";
import type { Result } from "~/types";
+export const config = { runtime: "nodejs" };
+
const supabaseClient = getSupabaseServiceRole();
export const postTransactionSchema = z.object({
documentId: z.string(),
diff --git a/apps/carbon/app/jobs/send-email-resend.server.ts b/apps/carbon/app/jobs/send-email-resend.server.ts
index 15ba902322..e9ef8b6c26 100644
--- a/apps/carbon/app/jobs/send-email-resend.server.ts
+++ b/apps/carbon/app/jobs/send-email-resend.server.ts
@@ -7,6 +7,8 @@ import { getSupabaseServiceRole } from "~/lib/supabase";
import { triggerClient } from "~/lib/trigger.server";
import { resendFormValidator } from "~/modules/settings";
+export const config = { runtime: "nodejs" };
+
const supabaseClient = getSupabaseServiceRole();
const job = triggerClient.defineJob({
diff --git a/apps/carbon/app/jobs/update-exchange-rates.server.ts b/apps/carbon/app/jobs/update-exchange-rates.server.ts
index fce5e7d10d..bb6e1034f7 100644
--- a/apps/carbon/app/jobs/update-exchange-rates.server.ts
+++ b/apps/carbon/app/jobs/update-exchange-rates.server.ts
@@ -6,6 +6,8 @@ import { triggerClient } from "~/lib/trigger.server";
import type { CurrencyCode } from "~/modules/accounting";
import { exchangeRatesFormValidator } from "~/modules/settings";
+export const config = { runtime: "nodejs" };
+
const supabaseClient = getSupabaseServiceRole();
const job = triggerClient.defineJob({
diff --git a/apps/carbon/app/jobs/update-permissions.server.ts b/apps/carbon/app/jobs/update-permissions.server.ts
index c76bd1c288..97020079b1 100644
--- a/apps/carbon/app/jobs/update-permissions.server.ts
+++ b/apps/carbon/app/jobs/update-permissions.server.ts
@@ -5,6 +5,8 @@ import { getSupabaseServiceRole } from "~/lib/supabase";
import { triggerClient } from "~/lib/trigger.server";
import { updatePermissions } from "~/modules/users/users.server";
+export const config = { runtime: "nodejs" };
+
const supabaseClient = getSupabaseServiceRole();
export const permissionsUpdateSchema = z.object({
id: z.string(),
diff --git a/apps/carbon/app/jobs/user-admin.server.ts b/apps/carbon/app/jobs/user-admin.server.ts
index 19c30e23da..620cfd8a6d 100644
--- a/apps/carbon/app/jobs/user-admin.server.ts
+++ b/apps/carbon/app/jobs/user-admin.server.ts
@@ -6,6 +6,8 @@ import { triggerClient } from "~/lib/trigger.server";
import { deactivateUser, resendInvite } from "~/modules/users/users.server";
import type { Result } from "~/types";
+export const config = { runtime: "nodejs" };
+
const supabaseClient = getSupabaseServiceRole();
export const userAdminSchema = z.object({
id: z.string(),
diff --git a/apps/carbon/app/routes/api+/autodesk.upload.ts b/apps/carbon/app/routes/api+/autodesk.upload.ts
index caf86bf190..8aae457747 100644
--- a/apps/carbon/app/routes/api+/autodesk.upload.ts
+++ b/apps/carbon/app/routes/api+/autodesk.upload.ts
@@ -5,6 +5,8 @@ import { requirePermissions } from "~/services/auth/auth.server";
import { flash } from "~/services/session.server";
import { error } from "~/utils/result";
+export const config = { runtime: "nodejs" };
+
export async function action({ request }: ActionFunctionArgs) {
const { client, companyId, userId } = await requirePermissions(request, {
update: "parts",
diff --git a/apps/carbon/app/routes/file+/purchase-order+/$orderId[.]pdf.tsx b/apps/carbon/app/routes/file+/purchase-order+/$orderId[.]pdf.tsx
index 3464bce760..4b1623c65b 100644
--- a/apps/carbon/app/routes/file+/purchase-order+/$orderId[.]pdf.tsx
+++ b/apps/carbon/app/routes/file+/purchase-order+/$orderId[.]pdf.tsx
@@ -12,6 +12,8 @@ import {
import { getCompany } from "~/modules/settings";
import { requirePermissions } from "~/services/auth/auth.server";
+export const config = { runtime: "nodejs" };
+
export async function loader({ request, params }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {
view: "purchasing",
diff --git a/apps/carbon/app/routes/file+/quote+/$id[.]pdf.tsx b/apps/carbon/app/routes/file+/quote+/$id[.]pdf.tsx
index 3e572d8d1c..e6a69b76fa 100644
--- a/apps/carbon/app/routes/file+/quote+/$id[.]pdf.tsx
+++ b/apps/carbon/app/routes/file+/quote+/$id[.]pdf.tsx
@@ -18,6 +18,8 @@ import { getCompany } from "~/modules/settings";
import { getBase64ImageFromSupabase } from "~/modules/shared";
import { requirePermissions } from "~/services/auth/auth.server";
+export const config = { runtime: "nodejs" };
+
export async function loader({ request, params }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {
view: "sales",
diff --git a/apps/carbon/app/routes/file+/sales-order+/$id[.]pdf.tsx b/apps/carbon/app/routes/file+/sales-order+/$id[.]pdf.tsx
index 43ed625d23..3d9f52589e 100644
--- a/apps/carbon/app/routes/file+/sales-order+/$id[.]pdf.tsx
+++ b/apps/carbon/app/routes/file+/sales-order+/$id[.]pdf.tsx
@@ -12,6 +12,8 @@ import {
import { getCompany } from "~/modules/settings";
import { requirePermissions } from "~/services/auth/auth.server";
+export const config = { runtime: "nodejs" };
+
export async function loader({ request, params }: LoaderFunctionArgs) {
const { client, companyId } = await requirePermissions(request, {
view: "sales",
diff --git a/apps/carbon/app/routes/x+/purchase-invoice+/$invoiceId.post.tsx b/apps/carbon/app/routes/x+/purchase-invoice+/$invoiceId.post.tsx
index 980a651da3..42bdfa669d 100644
--- a/apps/carbon/app/routes/x+/purchase-invoice+/$invoiceId.post.tsx
+++ b/apps/carbon/app/routes/x+/purchase-invoice+/$invoiceId.post.tsx
@@ -6,6 +6,8 @@ import { flash } from "~/services/session.server";
import { path } from "~/utils/path";
import { error } from "~/utils/result";
+export const config = { runtime: "nodejs" };
+
export async function action({ request, params }: ActionFunctionArgs) {
const { client } = await requirePermissions(request, {
update: "invoicing",
diff --git a/apps/carbon/app/routes/x+/purchase-order+/$orderId.release.tsx b/apps/carbon/app/routes/x+/purchase-order+/$orderId.release.tsx
index 7ddbd8bbd6..4051bb6768 100644
--- a/apps/carbon/app/routes/x+/purchase-order+/$orderId.release.tsx
+++ b/apps/carbon/app/routes/x+/purchase-order+/$orderId.release.tsx
@@ -21,6 +21,8 @@ import { assertIsPost } from "~/utils/http";
import { path } from "~/utils/path";
import { error, success } from "~/utils/result";
+export const config = { runtime: "nodejs" };
+
export async function action(args: ActionFunctionArgs) {
const { request, params } = args;
assertIsPost(request);
diff --git a/apps/carbon/app/routes/x+/quote+/$quoteId.finalize.tsx b/apps/carbon/app/routes/x+/quote+/$quoteId.finalize.tsx
index d07afe3d64..359a96e264 100644
--- a/apps/carbon/app/routes/x+/quote+/$quoteId.finalize.tsx
+++ b/apps/carbon/app/routes/x+/quote+/$quoteId.finalize.tsx
@@ -20,6 +20,8 @@ import { assertIsPost } from "~/utils/http";
import { path } from "~/utils/path";
import { error, success } from "~/utils/result";
+export const config = { runtime: "nodejs" };
+
export async function action(args: ActionFunctionArgs) {
const { request, params } = args;
assertIsPost(request);
diff --git a/apps/carbon/app/routes/x+/receipt+/$receiptId.post.tsx b/apps/carbon/app/routes/x+/receipt+/$receiptId.post.tsx
index 5bd477f344..1b513bd586 100644
--- a/apps/carbon/app/routes/x+/receipt+/$receiptId.post.tsx
+++ b/apps/carbon/app/routes/x+/receipt+/$receiptId.post.tsx
@@ -6,6 +6,8 @@ import { flash } from "~/services/session.server";
import { path } from "~/utils/path";
import { error } from "~/utils/result";
+export const config = { runtime: "nodejs" };
+
export async function action({ request, params }: ActionFunctionArgs) {
const { client } = await requirePermissions(request, {
update: "inventory",
diff --git a/apps/carbon/app/routes/x+/sales-rfq+/$rfqId.drag.tsx b/apps/carbon/app/routes/x+/sales-rfq+/$rfqId.drag.tsx
index 2fc1707ffa..a53522b005 100644
--- a/apps/carbon/app/routes/x+/sales-rfq+/$rfqId.drag.tsx
+++ b/apps/carbon/app/routes/x+/sales-rfq+/$rfqId.drag.tsx
@@ -10,6 +10,8 @@ import { assertIsPost } from "~/utils/http";
import { path } from "~/utils/path";
import { error } from "~/utils/result";
+export const config = { runtime: "nodejs" };
+
export async function action({ request, params }: ActionFunctionArgs) {
assertIsPost(request);
const { client, companyId, userId } = await requirePermissions(request, {
diff --git a/apps/carbon/app/routes/x+/users+/bulk-edit-permissions.tsx b/apps/carbon/app/routes/x+/users+/bulk-edit-permissions.tsx
index 99e6ac8a74..e66a9c2269 100644
--- a/apps/carbon/app/routes/x+/users+/bulk-edit-permissions.tsx
+++ b/apps/carbon/app/routes/x+/users+/bulk-edit-permissions.tsx
@@ -15,6 +15,8 @@ import { assertIsPost } from "~/utils/http";
import { getParams, path } from "~/utils/path";
import { error, success } from "~/utils/result";
+export const config = { runtime: "nodejs" };
+
export async function action({ request }: ActionFunctionArgs) {
assertIsPost(request);
const { companyId } = await requirePermissions(request, {
diff --git a/apps/carbon/app/routes/x+/users+/deactivate.tsx b/apps/carbon/app/routes/x+/users+/deactivate.tsx
index f095b3ec19..f92e3b5d35 100644
--- a/apps/carbon/app/routes/x+/users+/deactivate.tsx
+++ b/apps/carbon/app/routes/x+/users+/deactivate.tsx
@@ -11,6 +11,8 @@ import { flash } from "~/services/session.server";
import { safeRedirect } from "~/utils/http";
import { error, success } from "~/utils/result";
+export const config = { runtime: "nodejs" };
+
export async function action({ request }: ActionFunctionArgs) {
const { client } = await requirePermissions(request, {
delete: "users",
diff --git a/apps/carbon/app/routes/x+/users+/resend-invite.tsx b/apps/carbon/app/routes/x+/users+/resend-invite.tsx
index 9ef68120b8..0a5ffe0dec 100644
--- a/apps/carbon/app/routes/x+/users+/resend-invite.tsx
+++ b/apps/carbon/app/routes/x+/users+/resend-invite.tsx
@@ -10,6 +10,8 @@ import { requirePermissions } from "~/services/auth/auth.server";
import { flash } from "~/services/session.server";
import { error, success } from "~/utils/result";
+export const config = { runtime: "nodejs" };
+
export async function action({ request }: ActionFunctionArgs) {
const { client } = await requirePermissions(request, {
delete: "users",