Carlo is a Node.js framework designed to create hybrid desktop applications by rendering Node.js data structures and UIs using a locally installed Google Chrome browser instance. It establishes communication between Node.js and the browser via the Puppeteer project, offering a remote call infrastructure for seamless interoperability. Unlike Electron or NW.js, Carlo does not bundle Chromium, relying instead on the user's existing Chrome installation. This approach can lead to smaller application sizes and leverage an up-to-date browser. The project, currently at version 0.9.46, was last updated in June 2019, and its GitHub repository under `GoogleChromeLabs` shows no recent activity, indicating it is no longer actively maintained. Key differentiators included the ability to bundle the application into a single executable using `pkg`, exposing Node.js capabilities to a web frontend, and leveraging the web stack for dynamic visualization of Node.js app states.
npm install carloVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates launching a Carlo application, serving static HTML content, and exposing a Node.js function (`getSystemInfo`) to the browser environment. The browser-side JavaScript then calls this exposed function to retrieve and display system information from the Node.js process.
Consider migrating to actively maintained alternatives like Electron, NW.js, or Tauri, which provide similar desktop application capabilities with active development and community support.
Ensure Google Chrome (or a compatible Chromium-based browser) is installed on the target system. For specific browser paths, you might need to configure Puppeteer options within Carlo's launch arguments, although this is not directly exposed as a top-level Carlo option.
If encountering issues, try installing an older version of Chrome (e.g., Chrome 70-75) if possible for development/testing, or inspect Puppeteer's troubleshooting guides for compatibility with older client versions. There is no direct fix within Carlo itself due to its abandoned status.
Always use `await` when calling Carlo's asynchronous API methods within an `async` function. Ensure proper error handling (e.g., `try...catch` blocks) for these awaited operations.
Install Google Chrome or Chromium on your system. If Chrome is installed in a non-standard location, you might need to specify its executable path in the `carlo.launch()` options, for example: `carlo.launch({ executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' })` (macOS).Ensure `const carlo = require('carlo');` is at the top of your script and that `carlo` is properly installed via `npm install carlo`. Verify your Node.js version meets the `engines` requirement (>=7.6.0).Ensure `await app.exposeFunction('functionName', ...)` completes before any browser-side code attempts to call `functionName()`. Double-check that the function name in `exposeFunction` matches the name used in the browser JavaScript exactly.