{"id":14890,"library":"remix","title":"Remix Framework","description":"Remix is a full-stack web framework for building better websites with a focus on web standards and modern user experience. The current stable version is 2.17.4. Recent releases indicate a move towards version 3 with significant architectural changes, particularly in data handling and request context management, which are being rolled out through alpha versions and updates to core sub-packages like `session-middleware` and `fetch-router`.","status":"active","version":"2.17.4","language":"javascript","source_language":"en","source_url":"https://github.com/remix-run/remix","tags":["javascript","typescript"],"install":[{"cmd":"npm install remix","lang":"bash","label":"npm"},{"cmd":"yarn add remix","lang":"bash","label":"yarn"},{"cmd":"pnpm add remix","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This import path is for the upcoming Remix v3 (e.g., remix@3.0.0-alpha.4). Stable Remix 2.x typically imports from '@remix-run/node' or '@remix-run/react'.","symbol":"SqlStatement","correct":"import { SqlStatement } from 'remix/data-table';"}],"quickstart":{"code":"import { SqlStatement, sql } from 'remix/data-table';\n\ninterface User {\n  id: string;\n  name: string;\n}\n\nasync function getUsersQuery(nameFilter?: string): Promise<SqlStatement<User[]>> {\n  let query = sql`SELECT id, name FROM users`;\n  if (nameFilter) {\n    query = sql`${query} WHERE name = ${nameFilter}`;\n  }\n  return query as SqlStatement<User[]>;\n}\n\nasync function runExample() {\n  // In a real app, this would be executed by a Database adapter.\n  const statement = await getUsersQuery('Alice');\n  console.log('Generated SQL:', statement.sql);\n  console.log('Parameters:', statement.params);\n}\n\nrunExample();","lang":"typescript","description":"This example demonstrates defining a SQL statement using the `SqlStatement` and `sql` template literal tag from `remix/data-table`. This API is part of the new data layer introduced in Remix v3, allowing for type-safe SQL query construction."},"warnings":[{"fix":"Replace direct access to `context.session` with `context.get(Session)` for session data.","message":"Session state access has changed from `context.session` to `context.get(Session)`.","severity":"breaking","affected_versions":"session-middleware@>=0.2.0"},{"fix":"Update your code to use `context.get(FormData)` to retrieve parsed form data and uploaded files.","message":"Parsed form data is no longer available via `context.formData` or `context.files`. It must be accessed via `context.get(FormData)`.","severity":"breaking","affected_versions":"form-data-middleware@>=0.2.0"},{"fix":"Rename the `action` property to `handler` in your action object definitions.","message":"Action object definitions (e.g., in `router.get`, `router.post`) now require the property `handler` instead of `action` for specifying the handler function.","severity":"breaking","affected_versions":"fetch-router@>=0.18.0"},{"fix":"Change import statements from `remix/data-table/sql` to `remix/data-table`.","message":"The `remix/data-table/sql` export has been removed. `SqlStatement`, `sql`, and `rawSql` must now be imported directly from `remix/data-table`.","severity":"breaking","affected_versions":"remix@3.0.0-alpha.4"},{"fix":"For large multipart requests, explicitly raise the `maxParts` or `maxTotalSize` limits when calling the parsing functions.","message":"`parseMultipart()`, `parseMultipartStream()`, and `parseMultipartRequest()` now enforce finite default `maxParts` and `maxTotalSize` limits, potentially causing `MaxPartsExceededError` or `MaxTotalSizeExceededError` for large requests.","severity":"gotcha","affected_versions":"multipart-parser@>=0.15.0, form-data-parser@>=0.16.0"}],"env_vars":null,"last_verified":"2026-04-18T00:00:00.000Z","next_check":"2026-07-17T00:00:00.000Z","problems":[{"fix":"Update your code to access session state using `context.get(Session)` instead of `context.session`.","cause":"Attempting to access `context.session` after `session-middleware` was updated.","error":"TypeError: Cannot read properties of undefined (reading 'session')"},{"fix":"Update your code to access parsed form data using `context.get(FormData)` instead of `context.formData` or `context.files`.","cause":"Attempting to access `context.formData` or `context.files` after `form-data-middleware` was updated.","error":"TypeError: Cannot read properties of undefined (reading 'formData')"},{"fix":"Change your import statement to `import { SqlStatement, sql } from 'remix/data-table';`.","cause":"Importing `SqlStatement`, `sql`, or `rawSql` from the deprecated `remix/data-table/sql` path in Remix v3.","error":"Module not found: Error: Can't resolve 'remix/data-table/sql'"},{"fix":"Rename the `action` property to `handler` in your action object definitions (e.g., `router.get({ handler: ... })`).","cause":"Using `action` property instead of `handler` in an action object definition after `fetch-router` update.","error":"Property 'action' does not exist on type 'BuildAction'. Did you mean 'handler'?"},{"fix":"Increase the `maxParts` option in the `parseMultipart()` or `parseFormData()` call if you expect larger requests, e.g., `parseMultipart(request, { maxParts: 1000 })`.","cause":"A multipart request exceeded the default `maxParts` limit set by `multipart-parser` or `form-data-parser`.","error":"MaxPartsExceededError: Maximum number of parts exceeded"}],"ecosystem":"npm"}