Skip to main content
Question

Cannot redeclare block-scoped variable 'console'.

  • September 20, 2024
  • 0 replies
  • 71 views

Vignesh8

Hello everyone,

I’m developing a Figma plugin using the create-figma-plugin toolkit by Yuanqing. I’m encountering two problem

  1. Whenever I modify the UI of my plugin—such as changing fonts, colors, or other styles—the changes do not reflect when I run the plugin in Figma.I’ve tried rebuilding the plugin after making changes, but the UI remains the same.
  2. Error When Running npm run watch When I execute npm run watch, I receive the following error message:

node_modules/typescript/lib/lib.dom.d.ts:16669:13 - error TS2451: Cannot redeclare block-scoped variable ‘console’.

16669 declare var console: Console;
~~~~~~~

node_modules/@figma/plugin-typings/index.d.ts:11:9
11 const console: Console
~~~~~~~
‘console’ was also declared here.
Found 2 errors. Watching for file changes.


   This error seems to be related to TypeScript typings conflicting with Figma's plugin typings.

  Additionally, when I install `@create-figma-plugin/ui` or `@create-figma-plugin/utilities` separately, I encounter different errors.
This topic has been closed for replies.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings