{"record":{"id":"f9de31dbb5a67e0a","repo":"refinedev/refine","slug":"refine-will-use-build-index-js-as-default","errorCode":null,"errorMessage":"Refine will use `./build/index.js` as default","messagePattern":"Refine will use `\\./build/index\\.js` as default","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/cli/src/commands/runner/projectScripts.ts","lineNumber":72,"sourceCode":"    getBin: () => resolveBin(\"next\"),\n  },\n  [ProjectTypes.REMIX]: {\n    getDev: (args: string[]) => [\"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/index.js`\n      const hasArgs = args?.length;\n      if (hasArgs) {\n        return args;\n      }\n\n      // otherwise print a warning and use `./build/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/index.js` as default\");\n      console.warn(\"Example: `refine start ./build/index.js`\");\n      console.log();\n\n      return [\"./build/index.js\"];\n    },\n    getBuild: (args: string[]) => [\"build\", ...args],\n    getBin: (type?: \"dev\" | \"start\" | \"build\") => {\n      return resolveBin(type === \"start\" ? \"remix-serve\" : \"remix\");\n    },\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) {","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/refinedev/refine/blob/779d52a20e29b0307ac0df04d135beba434370dc/packages/cli/src/commands/runner/projectScripts.ts#L54-L90","documentation":"This is a console.warn emitted by the Refine CLI's `refine start` command when running a Remix project. Remix does not expose a conventional entry file that the runner can infer, so if no path argument is given in the package.json script, the CLI falls back to `./build/index.js` and warns about it. It is informational: the process still starts, just against an assumed default that may not exist.","triggerScenarios":"Running `refine start` (or `refine dev`/`refine build` via the runner) in a Remix project whose package.json script is exactly `refine start` with no positional entry-file argument (i.e., `hasArgs` is false for the classic Remix preset).","commonSituations":"Scaffolding a Remix app with the Refine CLI and forgetting to append the server entry path to the start script; projects migrated from other presets (Vite/Next) where an entry argument was never needed; older refine CLI versions that didn't require it.","solutions":["Edit package.json and change `\"start\": \"refine start\"` to `\"start\": \"refine start ./build/index.js\"`","Verify the built entry file actually exists at ./build/index.js after running `refine build` (or `remix build`)","If your build outputs elsewhere (e.g. ./build/server/index.js), pass that path instead"],"exampleFix":"// before\n\"start\": \"refine start\"\n// after\n\"start\": \"refine start ./build/index.js\"","handlingStrategy":"validation","validationCode":"// before start: assert the entry exists\nimport { existsSync } from 'node:fs';\nif (!existsSync('./build/index.js')) {\n  console.error('Build output missing — run `refine build` first');\n  process.exit(1);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always author start scripts with an explicit entry path instead of relying on CLI defaults","Add a CI step that verifies the configured entry file exists after build"],"tags":["remix","cli","refine-start","entry-file","configuration"],"backgroundTag":"missing-entry-file-argument","analyzedSha":"779d52a20e29b0307ac0df04d135beba434370dc","analyzedAt":"2026-08-27T11:15:25.854Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}