{"record":{"id":"640c304367bf4ccf","repo":"remix-run/remix","slug":"mounts-must-include-at-least-one-entry","errorCode":null,"errorMessage":"mounts must include at least one entry","messagePattern":"mounts must include at least one entry","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/assets/src/lib/asset-server.ts","lineNumber":1047,"sourceCode":"function resolveAssetServerOptions<transforms extends AssetRequestTransformMap>(\n  options: AssetServerCreateOptions<transforms>,\n): ResolvedAssetServerOptions<transforms> {\n  let rootDir = normalizeFilePath(fs.realpathSync(path.resolve(options.rootDir ?? process.cwd())))\n  let basePath = normalizeBasePath(options.basePath)\n  let scriptOptions = options.scripts ?? {}\n  let fingerprintOptions = normalizeFingerprintOptions({\n    fingerprint: options.fingerprint,\n    watch: options.watch,\n  })\n  let watchOptions = normalizeWatchOptions(options.watch)\n  let hmrFactory = normalizeHmrFactory(options.hmr)\n  let mounts = options.mounts ?? defaultMounts\n\n  if (hmrFactory && watchOptions === null) {\n    throw new TypeError('hmr requires watch mode')\n  }\n  if (Object.keys(mounts).length === 0) {\n    throw new TypeError('mounts must include at least one entry')\n  }\n  return {\n    allowFiles: options.allowFiles,\n    allowPackages: options.allowPackages,\n    basePath,\n    buildId: fingerprintOptions.buildId,\n    define: scriptOptions.define,\n    denyFiles: options.denyFiles,\n    external: scriptOptions.external ?? [],\n    files: normalizeFilesOptions(options.files),\n    fingerprintAssets: fingerprintOptions.enabled,\n    hmr: hmrFactory,\n    minify: options.minify ?? false,\n    mounts,\n    loaders: scriptOptions.loaders ?? [],\n    onError: options.onError ?? defaultErrorHandler,\n    rootDir,\n    routes: compileRoutes(basePath, [","sourceCodeStart":1029,"sourceCodeEnd":1065,"githubUrl":"https://github.com/remix-run/remix/blob/9696913134be3a4423513d2775f7b31d6917c049/packages/assets/src/lib/asset-server.ts#L1029-L1065","documentation":"A numeric `remix test` option received a value that doesn't parse as a number. `optionalNumber` trims and converts with `Number()` and rejects empty strings and NaN before the value reaches the test runner.","triggerScenarios":"Passing `--<number-flag> abc`, `--flag \"\"`, or `12abc` to `remix test`; `value.trim() === ''` or `Number.isNaN(Number(value))` triggers the throw for any numeric option routed through this helper.","commonSituations":"Empty shell variables expanding into flag values; values with units (`100ms`); localized formats with commas.","solutions":["Pass a plain number: `--bail 2`","Only include the flag when the variable is non-empty and numeric","Strip units/commas before passing values"],"exampleFix":"# before\nremix test --timeout \"100ms\"\n# after\nremix test --timeout 100","handlingStrategy":"validation","validationCode":"function numericOrOmit(raw: string | undefined): string[] {\n  if (raw === undefined || raw.trim() === '' || Number.isNaN(Number(raw))) return [];\n  return [raw];\n}\nrun(['remix','test', ...numericOrOmit(process.env.TEST_TIMEOUT)])","typeGuard":"function isNumericFlagValue(v: string): boolean {\n  return v.trim() !== '' && !Number.isNaN(Number(v));\n}","tryCatchPattern":null,"preventionTips":["Only pass numeric flags when the value is present and numeric","Strip units before passing values","Beware empty env vars expanding into flag values"],"tags":["cli","test","option-validation"],"backgroundTag":"invalid-option-value","analyzedSha":"9696913134be3a4423513d2775f7b31d6917c049","analyzedAt":"2026-08-27T19:55:01.024Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}