{"record":{"id":"69116c0edda8fd66","repo":"remix-run/remix","slug":"file-not-supported","errorCode":"FILE_NOT_SUPPORTED","errorMessage":"File type is not supported: ${identityPath}","messagePattern":"File type is not supported: (.+?)","errorType":"exception","errorClass":"AssetServerCompilationError","httpStatus":null,"severity":"error","filePath":"packages/assets/src/lib/asset-server.ts","lineNumber":458,"sourceCode":"      watcher.updateWatchedDirectories(delta)\n    },\n    onWatchFilesChange: (delta) => {\n      updateBrowserHmrWatchedFiles(delta)\n    },\n    rootDir: resolvedOptions.rootDir,\n    routes: resolvedOptions.routes,\n    sourceMapSourcePaths: resolvedOptions.sourceMapSourcePaths,\n    sourceMaps: resolvedOptions.sourceMaps,\n    target: resolvedOptions.scriptsTarget,\n    watchIgnore: resolvedOptions.watchOptions?.ignore,\n    watchMode: resolvedOptions.watchOptions !== null,\n  })\n  let styleCompiler = createStyleCompiler({\n    buildId: resolvedOptions.buildId,\n    fingerprintAssets: resolvedOptions.fingerprintAssets,\n    getServedFileUrl: (identityPath: string, options: { transform: readonly string[] | null }) => {\n      if (!fileCompiler) {\n        throw createAssetServerCompilationError(`File type is not supported: ${identityPath}`, {\n          code: 'FILE_NOT_SUPPORTED',\n        })\n      }\n\n      if (options.transform !== null) {\n        fileCompiler.validateTransformQuery(options.transform)\n      }\n\n      return fileCompiler.getHref(identityPath, { transform: options.transform })\n    },\n    hmr: sendHmrPayload\n      ? {\n          send(pathname, timestamp) {\n            sendHmrPayload({\n              timestamp,\n              type: 'browser:update',\n              updates: [\n                {","sourceCodeStart":440,"sourceCodeEnd":476,"githubUrl":"https://github.com/remix-run/remix/blob/9696913134be3a4423513d2775f7b31d6917c049/packages/assets/src/lib/asset-server.ts#L440-L476","documentation":"The asset server's URL resolver tried to compute a served URL for a file but no file compiler is configured, meaning this asset type cannot be compiled or served (e.g. requesting a non-script/static-only mode). It throws a compilation error with code FILE_NOT_SUPPORTED.","triggerScenarios":"Calling getServedFileUrl for a file when the asset server was created without a fileCompiler (for example a styles-only or scripts-only configuration), or asking it to serve a file type outside the configured compilers.","commonSituations":"Custom asset server setups that omit file compiler options but still reference files that need compilation; referencing source files (e.g. .ts/.tsx) from contexts where only static asset serving is enabled.","solutions":["Configure the asset server with the appropriate file compiler for the file types you serve","Only request served URLs for file types the server is configured to compile","Serve truly static files via the static file path instead of the compiler path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (!serverSupportsFileType(identityPath)) throw new Error('configure a file compiler first')","typeGuard":"const isCompilablePath = (p: string) => /\\.(ts|tsx|js|jsx|css|scss)$/.test(p)","tryCatchPattern":"try { url = getServedFileUrl(path) } catch (e) { if (e.code === 'FILE_NOT_SUPPORTED') fallbackToStatic(path) else throw e }","preventionTips":["Configure the file compiler for every file type you intend to serve through the asset server"],"tags":["assets","compiler","configuration"],"backgroundTag":"unsupported-file-type","analyzedSha":"9696913134be3a4423513d2775f7b31d6917c049","analyzedAt":"2026-08-27T19:55:01.024Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}