Skip to main content
Question

Install webpack


Nikita34

Hi, everybody.

I ran into one problem. After launching the newly created plugin in VS Code, you need to use the npm install --save-dev @figma/plugin-typings command to install Figma types.

Also I need to install webpack. I install it using the npm install --save-dev webpack command. After which the error occurs “Cannot redeclare block-scoped variable ‘console’”.
Screenshot with an error:
error
There is a conflict in two files due to the declared variable ‘console’.

Is there any way to solve this problem?

2 replies

Nikita34
  • Author
  • 4 replies
  • May 24, 2022

Has no one encountered such a problem when installing webpack?
I don’t understand why this happens when installing it, why it gives an error when ‘console’.
Please help me figure it out


richy
  • New Participant
  • 6 replies
  • September 3, 2022

I had to edit the tsconfig.json file to make it work, try if adding

"lib": ["es2016"]

to “compilerOptions” solves the issue. It did in my case.


Reply


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