Closed mehimanshupatil closed 2 years ago
yeah, I meet Typing issue, too, change to /// <reference types="./plugin-api" />
will fix it.
Same problem here. Hope they can fix it soon so we can share with our team without nedd to change node_modules manually. Until then I'm going to downgrade to v.1.38.0.
+1 this issue is still ongoing, I’m having issues with 1.38 too
As a workaround, you can use two separate tsconfig.json files for UI and for the backend code since you don't need the DOM lib in the plugin backend and that's what causing the conflict.
The node typing is added as you can see in the example https://github.com/figma/plugin-samples/blob/master/webpack-react/package.json must be for the testing library. Anyway, the console conflict is not causing the problem while running or bundling.
Getting this when trying to run the tsc: watch - tsconfig.json
task with plugin-typings 1.39.0:
node_modules/@figma/plugin-typings/index.d.ts:11:9 - error TS2649: Cannot augment module 'console' with value exports because it resolves to a non-module entity.
11 const console: Console
No issues with older versions.
Hi all, sorry for the inconvenience here. Looking into this now.
Hey! sorry about this, I just published a fix for this and you should be able to fix this by running
npm install @figma/plugin-typings@latest
to pick up the hot fix for this issue. Thanks for reporting this. The fixed version should be 1.39.1
@ymichael
This still appears to be happening for me
11 const console: Console
~~~~~~~
../../../../usr/local/lib/node_modules/typescript/lib/lib.dom.d.ts:19124:13
19124 declare var console: Console;
~~~~~~~
'console' was also declared here.
../../../../usr/local/lib/node_modules/typescript/lib/lib.dom.d.ts:19124:13 - error TS2451: Cannot redeclare block-scoped variable 'console'.
19124 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.
Hi @glassesUSA , do you mind sharing your tsconfig.json and verifying if an older version worked for you (eg. 1.38.0)
you can install an older version by doing:
npm install @figma/plugin-typings@1.38.0
I create #96 to track this issue and the follow ups! Lets move the conversation there!
After updating to the latest version 1.39.0. Typings was not auto resolved. found out
/// <reference path="./plugin-api" />
in index.d.ts should contain file extension i.e plugin-api.d.ts or else/// <reference types ="./plugin-api" />
and alsoconst console: Console
is conflicting with node.js globals so can you make const to varvar console: Console