Build fails after installing Figma new linter

Hi, i’m trying to migrate the Figma plugin to Dynamically Load Pages, followed the instructions here: Migrating Plugins to Dynamically Load Pages | Plugin API

And after i installed the linter the build fails with this error:

  error TS2688: Cannot find type definition file for '@types/eslint-plugin-figma-plugins'.
      The file is in the program because:
        Entry point of type library '@types/eslint-plugin-figma-plugins' specified in compilerOptions

Anyone had this issue?

Hey @Oren - I saw that you wrote into our support team about this. I made note of this topic on the ticket you have already, and someone will get back to you. I think it’s best for this one to be answered by them (they are much more knowledgeable on API related stuff than I am :sweat_smile:)

Thank you! I got an answer with some irrelevant articles…
I fixed this issue by adding “types”:[“node”] to compilerOptions in tsconfig.
BUT now the new methods do not exist on the API:
Property 'getNodeByIdAsync' does not exist on type 'PluginAPI'
How do I fix it?

Hi there,

I noticed that you’ve already reached out to our support team, and I believe it would be best to keep the conversation centralized there. Would you mind also sending an email to our support team? Your ticket number is #942351.

Thank you for your patience and understanding!

@Oren The “property missing” error you’re getting is probably because your project doesn’t have the most recent version of our TypeScript types. Try running npm update @figma/plugin-typings in your project folder. The property in the error message you posted was added to the type definition in version 1.87. See: Version 1, Update 87 | Plugin API

1 Like