Hey!

Hey! I'm trying to use Workflows within an existing Workers project. The project is using vite to build a remix app. But I'm getting this error if I try to add a workflows configuration into wrangler.jsonc:
Worker "workflows:workflow"'s binding "USER_WORKFLOW" refers to service "core:user:" with a named entrypoint "ExcelImportWorkflow", but "core:user:" has no such named entrypoint.
MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
at Miniflare2.#assembleAndUpdateConfig (/home/roboto/devel/portcity/cf-hono-remix/node_modules/miniflare/src/index.ts:1403:10)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Mutex.runWith (/home/roboto/devel/portcity/cf-hono-remix/node_modules/miniflare/src/workers/shared/sync.ts:66:45)
at Miniflare2.#waitForReady (/home/roboto/devel/portcity/cf-hono-remix/node_modules/miniflare/src/index.ts:1485:3)
at Miniflare2._getProxyClient (/home/roboto/devel/portcity/cf-hono-remix/node_modules/miniflare/src/index.ts:1691:3)
at Miniflare2.getBindings (/home/roboto/devel/portcity/cf-hono-remix/node_modules/miniflare/src/index.ts:1714:23)
at getPlatformProxy (/home/roboto/devel/portcity/cf-hono-remix/node_modules/wrangler/src/api/integrations/platform/index.ts:118:24)
at configureServer (/home/roboto/devel/portcity/cf-hono-remix/node_modules/@remix-run/dev/dist/vite/cloudflare-proxy-plugin.js:55:11)
at _createServer (file:///home/roboto/devel/portcity/cf-hono-remix/node_modules/vite/dist/node/chunks/dep-CHZK6zbr.js:63230:20)
at configResolved (/home/roboto/devel/portcity/cf-hono-remix/node_modules/@remix-run/dev/dist/vite/plugin.js:768:27) {
code: 'ERR_RUNTIME_FAILURE',
cause: undefined
Worker "workflows:workflow"'s binding "USER_WORKFLOW" refers to service "core:user:" with a named entrypoint "ExcelImportWorkflow", but "core:user:" has no such named entrypoint.
MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
at Miniflare2.#assembleAndUpdateConfig (/home/roboto/devel/portcity/cf-hono-remix/node_modules/miniflare/src/index.ts:1403:10)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Mutex.runWith (/home/roboto/devel/portcity/cf-hono-remix/node_modules/miniflare/src/workers/shared/sync.ts:66:45)
at Miniflare2.#waitForReady (/home/roboto/devel/portcity/cf-hono-remix/node_modules/miniflare/src/index.ts:1485:3)
at Miniflare2._getProxyClient (/home/roboto/devel/portcity/cf-hono-remix/node_modules/miniflare/src/index.ts:1691:3)
at Miniflare2.getBindings (/home/roboto/devel/portcity/cf-hono-remix/node_modules/miniflare/src/index.ts:1714:23)
at getPlatformProxy (/home/roboto/devel/portcity/cf-hono-remix/node_modules/wrangler/src/api/integrations/platform/index.ts:118:24)
at configureServer (/home/roboto/devel/portcity/cf-hono-remix/node_modules/@remix-run/dev/dist/vite/cloudflare-proxy-plugin.js:55:11)
at _createServer (file:///home/roboto/devel/portcity/cf-hono-remix/node_modules/vite/dist/node/chunks/dep-CHZK6zbr.js:63230:20)
at configResolved (/home/roboto/devel/portcity/cf-hono-remix/node_modules/@remix-run/dev/dist/vite/plugin.js:768:27) {
code: 'ERR_RUNTIME_FAILURE',
cause: undefined
2 Replies
Dom
DomOP5d ago
wrangler config:
{
"name": "website-assist",
"compatibility_date": "2025-02-04",
"main": "./server/index.ts",
"compatibility_flags": [
"nodejs_compat"
],
"workflows": [
{
"name": "workflow",
"binding": "USER_WORKFLOW",
"class_name": "ExcelImportWorkflow"
}
],
"assets": {
"directory": "./build/client",
"binding": "ASSETS"
},
{
"name": "website-assist",
"compatibility_date": "2025-02-04",
"main": "./server/index.ts",
"compatibility_flags": [
"nodejs_compat"
],
"workflows": [
{
"name": "workflow",
"binding": "USER_WORKFLOW",
"class_name": "ExcelImportWorkflow"
}
],
"assets": {
"directory": "./build/client",
"binding": "ASSETS"
},
vite config:
import { defineConfig } from "vite";
import {
vitePlugin as remix,
cloudflareDevProxyVitePlugin,
} from "@remix-run/dev";
import tsconfigPaths from "vite-tsconfig-paths";
import { getLoadContext } from "./load-context";

import devServer, { defaultOptions } from '@hono/vite-dev-server'
import adapter from '@hono/vite-dev-server/cloudflare'

declare module "@remix-run/cloudflare" {
interface Future {
v3_singleFetch: true;
}
}

export default defineConfig({
plugins: [
cloudflareDevProxyVitePlugin({
getLoadContext,
}),
remix({
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_singleFetch: true,
v3_lazyRouteDiscovery: true,
},
}),
devServer({
adapter,
entry: 'server/index.ts',
exclude: [...defaultOptions.exclude, '/assets/**', '/app/**'],
injectClientScript: false,
}),
tsconfigPaths(),
],
ssr: {
external: ["cloudflare:workers"],
resolve: {
conditions: ["workerd", "worker", "browser"],
},
},

resolve: {
mainFields: ["browser", "module", "main"],
},
build: {
minify: false,
dynamicImportVarsOptions: { exclude: ["cloudflare:workers"] }
},
});
import { defineConfig } from "vite";
import {
vitePlugin as remix,
cloudflareDevProxyVitePlugin,
} from "@remix-run/dev";
import tsconfigPaths from "vite-tsconfig-paths";
import { getLoadContext } from "./load-context";

import devServer, { defaultOptions } from '@hono/vite-dev-server'
import adapter from '@hono/vite-dev-server/cloudflare'

declare module "@remix-run/cloudflare" {
interface Future {
v3_singleFetch: true;
}
}

export default defineConfig({
plugins: [
cloudflareDevProxyVitePlugin({
getLoadContext,
}),
remix({
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_singleFetch: true,
v3_lazyRouteDiscovery: true,
},
}),
devServer({
adapter,
entry: 'server/index.ts',
exclude: [...defaultOptions.exclude, '/assets/**', '/app/**'],
injectClientScript: false,
}),
tsconfigPaths(),
],
ssr: {
external: ["cloudflare:workers"],
resolve: {
conditions: ["workerd", "worker", "browser"],
},
},

resolve: {
mainFields: ["browser", "module", "main"],
},
build: {
minify: false,
dynamicImportVarsOptions: { exclude: ["cloudflare:workers"] }
},
});
Originally, my binding was called IMPORT_WORKFLOW but that gave the same error, so I thought I call it USER_WORKFLOW bu still no luck
Seekerdasbatatas
If I had to guess this is correlated to how cloudflareDevProxyVitePlugin works and probably doesn't export the correct entrypoint for the dev workflows binding/DO to work

Did you find this page helpful?