{"record":{"id":"c0d36e011e708475","repo":"quarkusio/quarkus","slug":"invalid-component-link-componentlink-expeti","errorCode":null,"errorMessage":"Invalid component link [${componentLink}] - Expeting a link that ends with .js","messagePattern":"Invalid component link \\[(.+?)\\] - Expeting a link that ends with \\.js","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/devui/deployment-spi/src/main/java/io/quarkus/devui/spi/page/WebComponentPageBuilder.java","lineNumber":20,"sourceCode":"\npublic class WebComponentPageBuilder extends PageBuilder<WebComponentPageBuilder> {\n\n    protected WebComponentPageBuilder() {\n        super();\n    }\n\n    public WebComponentPageBuilder componentName(String componentName) {\n        if (componentName == null || componentName.isEmpty()) {\n            throw new RuntimeException(\"Invalid component [\" + componentName + \"]\");\n        }\n\n        super.componentName = componentName;\n        return this;\n    }\n\n    public WebComponentPageBuilder componentLink(String componentLink) {\n        if (componentLink == null || componentLink.isEmpty() || !componentLink.endsWith(DOT_JS)) {\n            throw new RuntimeException(\n                    \"Invalid component link [\" + componentLink + \"] - Expeting a link that ends with .js\");\n        }\n\n        super.componentLink = componentLink;\n        return this;\n    }\n}","sourceCodeStart":2,"sourceCodeEnd":27,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/devui/deployment-spi/src/main/java/io/quarkus/devui/spi/page/WebComponentPageBuilder.java#L2-L27","documentation":"WebComponentPageBuilder.componentLink() requires the link to the web component's JS bundle to end with '.js' (DOT_JS) and to be non-empty. A null, empty, or non-.js link throws a RuntimeException (note the 'Expeting' typo in the message). The Dev UI loads components as JS modules, so only .js links are accepted.","triggerScenarios":"Calling componentLink() with null, empty string, or a URL/path not ending in .js, e.g. componentLink(\"/components/foo.ts\") or a missing leading slash plus wrong extension.","commonSituations":"Pointing at a TS source, a directory, or a bundled asset whose generated filename changed extension; copy-pasting a link with a query string after .js.","solutions":["Pass a link ending exactly in .js, e.g. componentLink(\"/my-ext/foo-component.js\")","Verify the referenced JS file is actually produced/packaged by the extension's build","Strip query strings/fragments before appending the .js path"],"exampleFix":"// before\nbuilder.componentLink(\"components/my-card.ts\");\n// after\nbuilder.componentLink(\"components/my-card.js\");","handlingStrategy":"validation","validationCode":"if (link == null || !link.endsWith(\".js\")) { throw new IllegalStateException(\"component link must end with .js: \" + link); }\npageBuilder.componentLink(link);","typeGuard":"boolean isValidJsLink(String s) { return s != null && s.endsWith(\".js\"); }","tryCatchPattern":null,"preventionTips":["Keep generated web-component assets as .js files and reference them with stable paths","Strip query strings before appending .js paths"],"tags":["devui","builder-validation"],"backgroundTag":"invalid-builder-argument","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}