{"record":{"id":"9c9288194a1fda9e","repo":"meteor/meteor","slug":"could-not-load-htmlrspackplugin-from-host-project","errorCode":null,"errorMessage":"Could not load HtmlRspackPlugin from host project.","messagePattern":"Could not load HtmlRspackPlugin from host project\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"npm-packages/meteor-rspack/plugins/HtmlRspackPlugin.js","lineNumber":18,"sourceCode":"const RspackMeteorHtmlPlugin = require('./RspackMeteorHtmlPlugin.js');\nconst { loadHtmlRspackPluginFromHost } = RspackMeteorHtmlPlugin;\n\n/**\n * A plugin that composes the original HtmlRspackPlugin from @rspack/core\n * and RspackMeteorHtmlPlugin, in that order.\n */\nclass HtmlRspackPlugin {\n  constructor(options = {}) {\n    this.options = options;\n  }\n\n  apply(compiler) {\n    // Load the original HtmlRspackPlugin from the host project\n    const OriginalHtmlRspackPlugin = loadHtmlRspackPluginFromHost(compiler);\n\n    if (!OriginalHtmlRspackPlugin) {\n      throw new Error('Could not load HtmlRspackPlugin from host project.');\n    }\n\n    // Apply the original HtmlRspackPlugin\n    const originalPlugin = new OriginalHtmlRspackPlugin(this.options);\n    originalPlugin.apply(compiler);\n\n    // Apply the RspackMeteorHtmlPlugin\n    const meteorPlugin = new RspackMeteorHtmlPlugin();\n    meteorPlugin.apply(compiler);\n  }\n}\n\nmodule.exports = HtmlRspackPlugin;\n","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/meteor/meteor/blob/5076d2f818d3cac01d0cf8312fa5b2332076a4fb/npm-packages/meteor-rspack/plugins/HtmlRspackPlugin.js#L1-L32","documentation":"Error \"Could not load HtmlRspackPlugin from host project.\" thrown in meteor/meteor.","triggerScenarios":"Thrown when the HtmlRspackPlugin package cannot be resolved from the host project's node_modules.","commonSituations":"The app has not installed @rspack/core / html-rspack-plugin, or node_modules is not installed.","solutions":["Install @rspack/core (or the package providing HtmlRspackPlugin) in your project: meteor npm install --save-dev @rspack/core.","Ensure the host project's node_modules are installed by running meteor npm install."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5076d2f818d3cac01d0cf8312fa5b2332076a4fb","analyzedAt":"2026-08-13T03:27:40.142Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}