Convex 1.4 introduces a new option to install packages used in your Node action environment on the server, a variety of logging improvements, a new option to pause deployments, a new npm create convex command and more!

External packages in Node.js

Before 1.4, several NPM dependencies were unsupported in Convex functions due to their large code sizes or incompatibilities with our bundling process. To enable more packages, Convex 1.4 introduces External Packages in the Node.js runtime, an opt-in feature for excluding dependencies from bundling and instead installing them on the server. At runtime, these dependencies are made available to your Convex functions.

External packages are subject to significantly higher limits than Convex bundling limits and support many packages previously incompatible with our bundling.

To opt-in to this feature, create a convex.json file at the root of your project, where your package.json is located, and include the following:

{
	"node": {
		"externalPackages": ["*"]
	}
}

Check out the new Bundling docs section for more details.

Create projects with npm create convex

Starting a new project often involves a lot of boilerplate and time setting up your favorite frameworks, like React, Vite/Next.js, Tailwind, Convex, and more. To speed up this process, you can now run npm create convex to automatically start from a template project with common dependencies included by default.

npm create convex allows you to configure your project with Vite, Next.js, or neither. It also allows you to optionally integrate with Clerk auth. The React framework templates ship with Tailwind and shadcdn/ui out-of-the-box. Check out the command README.

Skip the boilerplate and get right to coding!

Logging improvements

Convex 1.4 comes with various logging improvements to make debugging your functions easier:

  • 8x increase in log limits, allowing log lines to be up to 32KB
  • The new CLI command npx convex logs which streams server logs in a human-readable format to your terminal
  • Exceeding log limits in functions will no longer raise an error
    • If the the max length of a log line is exceeded, the line will be truncated
    • If the max number of log lines in a function is exceeded, further logs will be skipped and a warning log will be included (pictured below)

HTTP Functions API

Convex sports JavaScript, Python and Rust APIs client libraries, but what about everything else? Convex enthusiasts and employees have written clients in languages like Go using the HTTP API, which is now improved and documented.

The HTTP API provides access to all public queries, mutations, and actions of a deployment making it a simple alternative to implementing a public API for a project with Convex HTTP Actions.

Write another Go client, write a Bash client with cURL, live on the edge and use raw fetch() calls to communicate with a Convex deployment!

Other improvements

  • Convex Python 0.5.0 release. See the changelog here.
  • Beta support for Fivetran Source Connector. Contact us if you are interested!
  • npx convex run now does not push code by default. Pushing before running a function can be enabled via npx convex run --push.
  • Code generation no longer breaks when convex/ folder includes an empty/invalid TypeScript module file. Valid TS modules must include at least one import or export statement.
  • Importing from convex/server when running in a test environment with jsdom no longer throws.
  • Text search now allows undefined (meaning field is missing) in search filters, in parity with normal database query filters.