{"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/3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016/api/node/binding.cjs#L41-L77","documentation":"The Node binding's loader enables the development binary only when slint-ui-dev's version exactly matches slint-ui, because the dev package's native code is paired with the JavaScript glue of that same release - mixing them would combine incompatible glue and native code. On mismatch it logs '[slint-ui] Ignoring slint-ui-dev <devVersion>: it does not match slint-ui <ownVersion> ...' and stays on the lean release binary, so system-testing/MCP features requested via SLINT_MCP_PORT/SLINT_TEST_SERVER remain unavailable.","triggerScenarios":"Running Node with SLINT_MCP_PORT or SLINT_TEST_SERVER set while the installed slint-ui and slint-ui-dev npm packages report different versions (one updated without the other, semver-range drift, or mismatched lockfile entries).","commonSituations":"npm update slint-ui without touching slint-dev/slint-ui-dev; using ^ ranges so the two packages drift apart; stale CI caches; installing slint-ui-dev from a branch against a released slint-ui.","solutions":["Install the exact same version of both: npm install --save-exact slint-ui@X.Y.Z slint-ui-dev@X.Y.Z.","Verify with npm ls slint-ui slint-ui-dev that the versions line up.","Pin both packages (no ^ ranges) in package.json so they cannot drift.","If dev features are not needed in that run, unset SLINT_MCP_PORT/SLINT_TEST_SERVER and use the lean binary deliberately."],"exampleFix":"# before: slint-ui@1.12.0 + slint-ui-dev@1.11.0 -> warning, dev binary ignored\nnpm ls slint-ui slint-ui-dev\n\n# after: exact same version on both\nnpm install --save-exact slint-ui@1.12.0 slint-ui-dev@1.12.0","handlingStrategy":"validation","validationCode":"// Fail fast in test bootstrap when dev features are requested:\nconst own = require(\"slint-ui/package.json\").version;\nlet dev: string | null = null;\ntry { dev = require(\"slint-ui-dev/package.json\").version; } catch { /* not installed */ }\nif (process.env.SLINT_MCP_PORT && dev !== own) {\n    throw new Error(`install slint-ui-dev@${own} to match slint-ui@${own}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin exact versions of slint-ui and slint-ui-dev in package.json (--save-exact, no ^ ranges)","Update the two packages as a pair, never individually","Add the bootstrap version check above to CI so drift fails loudly"],"tags":["node","version-mismatch","slint-ui-dev","packaging","npm"],"backgroundTag":"dependency-version-mismatch","analyzedSha":"3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016","analyzedAt":"2026-08-19T23:23:16.610Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}