Skip to content

Conversation

@octo-sts
Copy link
Contributor

@octo-sts octo-sts bot commented Nov 14, 2025

Commit: 7517d28a5fdb00ccf57088353c82862aad43e710

@octo-sts octo-sts bot added automated pr request-version-update request for a newer version of a package calico-3.31 labels Nov 14, 2025
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Nov 14, 2025

🛑 Build Failed: Compilation

TypeError: Cannot set property message of which has only a getter at Object.toString (/home/build/whisker/node_modules/@rsbuild/core/compiled/html-rspack-plugin/index.js:509:27)

Build Details

Category Details
Build System yarn/rsbuild
Failure Point rsbuild build process during HTML plugin compilation

Root Cause Analysis 🔍

The html-rspack-plugin is attempting to modify a read-only 'message' property on an error object. This appears to be a compatibility issue between the plugin version and Node.js v25.2.0, where the error object's message property has only a getter and cannot be reassigned.


🔍 Build failure fix suggestions

Found similar build failures that have been fixed in the past and analyzed them to suggest a fix:

Suggested Changes

File: package.json

  • dependency_version_constraint at line environment packages list (environment.contents.packages)
    Original:
nodejs

Replacement:

nodejs~24

Content:

Pin Node.js to version 24.x to avoid compatibility issues with html-rspack-plugin

File: package.json

  • alternative_dependency at line environment packages list (environment.contents.packages)
    Original:
nodejs
        - yarn

Replacement:

nodejs-20
        - yarn

Content:

Use Node.js 20 LTS which has better compatibility with current build tools
Click to expand fix analysis

Analysis

No similar build failures were provided for analysis. However, based on the error message, this is a Node.js v25.2.0 compatibility issue with html-rspack-plugin where it's trying to set a read-only 'message' property on an error object. This type of issue commonly occurs when JavaScript engines make properties more restrictive in newer versions.

Click to expand fix explanation

Explanation

The error occurs because Node.js v25.2.0 has made the 'message' property on Error objects read-only (getter-only), but html-rspack-plugin is trying to assign to it. This is a breaking change in the JavaScript engine's error handling. Downgrading to Node.js 24.x or 20.x (LTS) will resolve this compatibility issue since these versions still allow modification of the error message property. Node.js 20 LTS is particularly recommended as it's the current long-term support version and has extensive compatibility testing with build tools like RSBuild and webpack-based plugins.

Click to expand alternative approaches

Alternative Approaches

  • Update html-rspack-plugin to a newer version that's compatible with Node.js 25.x if available
  • Switch from html-rspack-plugin to a different HTML plugin that supports Node.js 25.x
  • Pin the Node.js version in the Docker/container environment rather than just the package manager
  • Use Node.js version manager to enforce specific version during yarn build process

Was this comment helpful? Please use 👍 or 👎 reactions on this comment.

@octo-sts octo-sts bot added the ai/skip-comment Stop AI from commenting on PR label Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/skip-comment Stop AI from commenting on PR automated pr calico-3.31 request-version-update request for a newer version of a package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant