{"record":{"id":"66ab0ebeb3bca8ce","repo":"refinedev/refine","slug":"refine-will-use-build-server-index-js-as-defau","errorCode":null,"errorMessage":"Refine will use `./build/server/index.js` as default","messagePattern":"Refine will use `\\./build/server/index\\.js` as default","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/cli/src/commands/runner/projectScripts.ts","lineNumber":99,"sourceCode":"    },\n  },\n  [ProjectTypes.REMIX_VITE]: {\n    getDev: (args: string[]) => [\"vite:dev\", ...args],\n    getStart: (args: string[]) => {\n      // remix-serve accepts a path to the entry file as an argument\n      // if we have arguments, we will pass them to remix-serve and do nothing.\n      // ex: `refine start ./build/server/index.js`\n      const hasArgs = args?.length;\n      if (hasArgs) {\n        return args;\n      }\n\n      // otherwise print a warning and use `./build/server/index.js` as default\n      console.log();\n      console.warn(\n        \"🚨 Remix requires a path to the entry file. Please provide it as an argument to `refine start` command in package.json scripts\",\n      );\n      console.warn(\"Refine will use `./build/server/index.js` as default\");\n      console.warn(\"Example: `refine start ./build/server/index.js`\");\n      console.log();\n\n      return [\"./build/server/index.js\"];\n    },\n    getBuild: (args: string[]) => [\"vite:build\", ...args],\n    getBin: (type?: \"dev\" | \"start\" | \"build\") => {\n      return resolveBin(type === \"start\" ? \"remix-serve\" : \"remix\");\n    },\n  },\n  [ProjectTypes.REMIX_SPA]: {\n    getDev: (args: string[]) => [\"vite:dev\", ...args],\n    getStart: (args: string[]) => [\"preview\", ...args],\n    getBuild: (args: string[]) => [\"vite:build\", ...args],\n    getBin: (type?: \"dev\" | \"start\" | \"build\") => {\n      return resolveBin(type === \"start\" ? \"vite\" : \"remix\");\n    },\n  },","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/refinedev/refine/blob/779d52a20e29b0307ac0df04d135beba434370dc/packages/cli/src/commands/runner/projectScripts.ts#L81-L117","documentation":"Emitted by the Refine CLI runner's remix-vite preset when `refine start` is called without an explicit entry file. The CLI warns that it is assuming the Vite build server output `./build/server/index.js` as the entry. If that file doesn't exist (e.g., not built yet), the subsequent start will fail with a module-not-found error.","triggerScenarios":"`refine start` with zero extra args in a project detected as remix-vite (hasArgs false), so the runner returns the hardcoded default entry array.","commonSituations":"Running `refine start` before `refine build` in a Remix Vite project; templates that shipped `\"start\": \"refine start\"`; misreading classic Remix docs (./build/index.js) while on the Vite plugin.","solutions":["Add `./build/server/index.js` to the start script","Ensure the build step (`vite:build`) runs before start in your workflow","If the build output path is customized in vite.config, pass the real path explicitly"],"exampleFix":"// before\n\"start\": \"refine start\"\n// after\n\"start\": \"refine start ./build/server/index.js\"","handlingStrategy":"validation","validationCode":"if (!existsSync('./build/server/index.js')) throw new Error('Missing ./build/server/index.js — build first');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Know your preset (classic vs vite) — the default entry differs","Never rely on fallback defaults in production start scripts"],"tags":["remix","vite","cli","entry-file","fallback-default"],"backgroundTag":"missing-entry-file-argument","analyzedSha":"779d52a20e29b0307ac0df04d135beba434370dc","analyzedAt":"2026-08-27T11:15:25.854Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}