{"record":{"id":"c96167649619c88d","repo":"slint-ui/slint","slug":"slint-ui-ignoring-slint-ui-dev-devversion-it","errorCode":null,"errorMessage":"[slint-ui] Ignoring slint-ui-dev ${devVersion}: it does not match slint-ui ${ownVersion}. Install slint-ui-dev@${ownVersion} to enable the development binary.","messagePattern":"\\[slint-ui\\] Ignoring slint-ui-dev (.+?): it does not match slint-ui (.+?)\\. Install slint-ui-dev@(.+?) to enable the development binary\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"api/node/binding.cjs","lineNumber":59,"sourceCode":"        if (error && error.code !== \"MODULE_NOT_FOUND\") {\n            throw error;\n        }\n    }\n\n    // 2. The optional `slint-ui-dev` package, but only when MCP or system testing\n    //    is requested (otherwise stay on the lean release binary). Its native\n    //    binary is paired with a specific slint-ui version, so refuse to load it on\n    //    a version mismatch: that would combine incompatible JavaScript glue and\n    //    native code. The binary is loaded through the `slint-ui-dev/loader`\n    //    subpath; the package entry point itself throws to catch direct imports.\n    const devRequested =\n        !!process.env.SLINT_MCP_PORT || !!process.env.SLINT_TEST_SERVER;\n    if (devRequested) {\n        try {\n            const devVersion = require(\"slint-ui-dev/package.json\").version;\n            const ownVersion = require(\"./package.json\").version;\n            if (devVersion !== ownVersion) {\n                console.warn(\n                    `[slint-ui] Ignoring slint-ui-dev ${devVersion}: it does not match ` +\n                        `slint-ui ${ownVersion}. Install slint-ui-dev@${ownVersion} to enable ` +\n                        `the development binary.`,\n                );\n            } else {\n                return require(\"slint-ui-dev/loader\");\n            }\n        } catch (error) {\n            // Not installed, or its native binary is unavailable on this platform.\n            if (error && error.code !== \"MODULE_NOT_FOUND\") {\n                console.warn(\n                    `[slint-ui] Could not load slint-ui-dev: ${error.message}`,\n                );\n            }\n        }\n    }\n\n    // 3. Default release binary.","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/slint-ui/slint/blob/bb937076de3f7919766c1f25e2e969367cf77e9a/api/node/binding.cjs#L41-L77","documentation":"When SLINT_MCP_PORT or SLINT_TEST_SERVER is set, the slint-ui Node binding tries to load the optional slint-ui-dev package to enable the development (MCP/system-test capable) native binary. Because the dev binary is paired with an exact slint-ui version, a mismatched version is deliberately refused: this warning is printed and loading falls through to the default release binary.","triggerScenarios":"Setting SLINT_MCP_PORT or SLINT_TEST_SERVER while an installed slint-ui-dev package's version (read from slint-ui-dev/package.json) differs from the slint-ui package's own version — typically after upgrading slint-ui without reinstalling slint-ui-dev (or vice versa).","commonSituations":"Running `npm update`/`pnpm update` that bumped slint-ui but left an old slint-ui-dev installed; installing a locally built slint-ui-dev built from a different commit than the slint-ui version in node_modules; CI environments caching slint-ui-dev across slint-ui version bumps.","solutions":["Install the matching dev package: `npm install slint-ui-dev@<slint-ui version>` (the exact version is stated in the warning message).","Rebuild slint-ui-dev from the same source tree/commit as the installed slint-ui package.","Remove slint-ui-dev (`npm uninstall slint-ui-dev`) if you don't need MCP/testing, so the release binary loads cleanly.","Pin slint-ui and slint-ui-dev to the same version in package.json / lockfile so they upgrade together."],"exampleFix":"// before: package.json has mismatched versions\n\"dependencies\": { \"slint-ui\": \"1.9.0\" },\n\"devDependencies\": { \"slint-ui-dev\": \"1.8.0\" }\n// after\n\"dependencies\": { \"slint-ui\": \"1.9.0\" },\n\"devDependencies\": { \"slint-ui-dev\": \"1.9.0\" }","handlingStrategy":"validation","validationCode":"const own = require('slint-ui/package.json').version;\nlet dev;\ntry { dev = require('slint-ui-dev/package.json').version; } catch { dev = null; }\nif (dev && dev !== own) {\n    throw new Error(`slint-ui-dev@${dev} != slint-ui@${own}; run: npm install slint-ui-dev@${own}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin slint-ui and slint-ui-dev to identical versions in package.json.","After every slint-ui upgrade, reinstall/upgrade slint-ui-dev in the same change.","Only set SLINT_MCP_PORT / SLINT_TEST_SERVER when a matching slint-ui-dev is actually installed.","In CI, add a version-equality check step before enabling MCP testing."],"tags":["nodejs","native-module","version-mismatch","mcp"],"backgroundTag":"missing-dependency","analyzedSha":"bb937076de3f7919766c1f25e2e969367cf77e9a","analyzedAt":"2026-09-16T01:37:20.251Z","contentChangedAt":"2026-09-16T01:37:20.251Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}