refinedev/refine · warning
Example: `refine start ./build/index.js`
Error message
Example: `refine start ./build/index.js`
What it means
Part of the same three-line warning block printed by the Refine CLI runner for Remix projects when `refine start` is invoked without an entry file argument. This line shows the correct usage so the developer can fix the package.json script. Purely informational; the command proceeds with the `./build/index.js` default.
Source
Thrown at packages/cli/src/commands/runner/projectScripts.ts:73
},
[ProjectTypes.REMIX]: {
getDev: (args: string[]) => ["dev", ...args],
getStart: (args: string[]) => {
// remix-serve accepts a path to the entry file as an argument
// if we have arguments, we will pass them to remix-serve and do nothing.
// ex: `refine start ./build/index.js`
const hasArgs = args?.length;
if (hasArgs) {
return args;
}
// otherwise print a warning and use `./build/index.js` as default
console.log();
console.warn(
"🚨 Remix requires a path to the entry file. Please provide it as an argument to `refine start` command in package.json scripts",
);
console.warn("Refine will use `./build/index.js` as default");
console.warn("Example: `refine start ./build/index.js`");
console.log();
return ["./build/index.js"];
},
getBuild: (args: string[]) => ["build", ...args],
getBin: (type?: "dev" | "start" | "build") => {
return resolveBin(type === "start" ? "remix-serve" : "remix");
},
},
[ProjectTypes.REMIX_VITE]: {
getDev: (args: string[]) => ["vite:dev", ...args],
getStart: (args: string[]) => {
// remix-serve accepts a path to the entry file as an argument
// if we have arguments, we will pass them to remix-serve and do nothing.
// ex: `refine start ./build/server/index.js`
const hasArgs = args?.length;
if (hasArgs) {
return args;View on GitHub (pinned to 779d52a20e)
Solutions
- Update the start script to `refine start ./build/index.js` as the example suggests
- Confirm ./build/index.js is the actual build output of your Remix (classic) build
Example fix
// before "start": "refine start" // after "start": "refine start ./build/index.js"
Defensive patterns
Strategy: validation
Validate before calling
const startScript = pkg.scripts.start;
if (!startScript || !startScript.includes('./build/')) {
console.warn('start script missing entry file argument');
} Prevention
- Treat this hint as a lint signal: fix the script, don't suppress the warning
When it happens
Trigger: Identical to the trigger for the fallback warning: `refine start` with no positional argument in a Remix-classic project (hasArgs false in the Remix preset of projectScripts.ts).
Common situations: Freshly created Remix Refine projects; CI pipelines where the start script was copied from a non-Remix template and lacks the entry path.
Related errors
- Refine will use `./build/index.js` as default
- Example: `refine start ./build/server/index.js`
- Refine will use `./build/server/index.js` as default
- Invalid provider: ${providerId}
- Timed out while checking for updates.
AI-assisted analysis of refinedev/refine@779d52a20e (2026-08-27).
Data as JSON: /api/errors/3a0ef84f5e758fc7.
Report an issue: GitHub.