{"record":{"id":"e414c405b6018da9","repo":"slint-ui/slint","slug":"slint-ui-dev-must-not-be-imported-directly-it-only-provides","errorCode":null,"errorMessage":"slint-ui-dev must not be imported directly — it only provides the development binary for slint-ui. Import from \"slint-ui\" instead; having slint-ui-dev installed as a devDependency is enough to enable the development binary.","messagePattern":"slint-ui-dev must not be imported directly — it only provides the development binary for slint-ui\\. Import from \"slint-ui\" instead; having slint-ui-dev installed as a devDependency is enough to enable the development binary\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"api/node/dev-package/index.cjs","lineNumber":11,"sourceCode":"// Copyright © SixtyFPS GmbH <info@slint.dev>\n// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0\n\n// slint-ui-dev only provides the development native binary for slint-ui; it is\n// not meant to be imported directly. The actual binary is exposed via the\n// \"slint-ui-dev/loader\" subpath, which slint-ui loads internally. Importing this\n// package directly is almost always a mistake, so fail loudly with a hint.\n\n\"use strict\";\n\nthrow new Error(\n    \"slint-ui-dev must not be imported directly — it only provides the \" +\n        'development binary for slint-ui. Import from \"slint-ui\" instead; having ' +\n        \"slint-ui-dev installed as a devDependency is enough to enable the \" +\n        \"development binary.\",\n);\n","sourceCodeStart":1,"sourceCodeEnd":17,"githubUrl":"https://github.com/slint-ui/slint/blob/bb937076de3f7919766c1f25e2e969367cf77e9a/api/node/dev-package/index.cjs#L1-L17","documentation":"The slint-ui-dev package is a support package that only ships the development native binary for slint-ui; importing it directly is intentionally blocked with this Error. slint-ui loads the binary via the slint-ui-dev/loader subpath at runtime.","triggerScenarios":"Requiring/importing 'slint-ui-dev' (require('slint-ui-dev') or import) instead of 'slint-ui'.","commonSituations":"Autocomplete picking the wrong package in an import statement, misunderstanding the dev-package's role when installing it as a devDependency to get the debug binary.","solutions":["Import from 'slint-ui' instead: const slint = require('slint-ui').","Keep slint-ui-dev only as a devDependency; do not reference it in application code.","Remove accidental slint-ui-dev imports from bundled source."],"exampleFix":"// before\nconst slint = require('slint-ui-dev');\n// after\nconst slint = require('slint-ui');","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"function importsDevPackageDirectly(specifier: string): boolean {\n  return specifier === 'slint-ui-dev' || specifier.startsWith('slint-ui-dev/');\n}","tryCatchPattern":null,"preventionTips":["Always import the public entry point 'slint-ui'.","Add an ESLint no-restricted-imports rule banning 'slint-ui-dev'.","Keep slint-ui-dev listed only in devDependencies."],"tags":["nodejs","wrong-import","package-usage"],"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"}