How to get rid of the error 'cannot asssign to 'cornerRadius' because it is a read-only property '?

Hello all! I’m new to this whole development world but I’m being able to do some small things in my new plugin with ReactJS.

The issue is that errors printing in the console make me crazy.
Even more when the functionality works as expected, which is the case for when I’m using

    for(const node of figma.currentPage.selection) {
      if ("cornerRadius" in node) {
        node.cornerRadius = msg.value;
      } else {
        console.log('corner radius not available')
      }
    }

And it works as expected. I click a button and the new value is assigned to the cornerradius of the selected node.

But WHY IS THE TERMINAL GIVING ME THIS ERROR?

Cannot assign to 'cornerRadius' because it is a read-only property.

It is making me crazy! hahahahha

Well, I really don’t know how it disappeared, but just posting if anyone happens to stumble upon this too, this is my final code.

	for(const node of figma.currentPage.selection) {
		if ("cornerRadius" in node) {
			node.cornerRadius = 16;
			node.cornerSmoothing = 0.6;
		} else {
			//
		}
	}