Install webpack

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?

1 Like

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

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.