Skip to main content
Question

Cannot find name __uiFiles__

  • September 5, 2021
  • 4 replies
  • 1933 views

rix

What am I doing wrong?

manifest.json

  "ui": {
    "main": "index.html",
    "secondary": "secondary.html"
  }
  "menu": [
    {"name": "main", "command": "main"},
    {"name": "secondary", "command": "secondary"}
]

code.js
if (command === 'main') figma.showUI(__uiFiles__.main, {width: 600, height: 400});

terminal:

src/main/code.ts(4,38): error TS2304: Cannot find name '__uiFiles__'.
TypeScript: 1 semantic error

4 replies

Gleb
  • Power Member
  • 4708 replies
  • September 5, 2021

I think you might be using an old version of the typings file where this property didn’t exist yet. Update your typings: @figma/plugin-typings - npm


rix
  • Author
  • 2 replies
  • September 6, 2021

npm i @figma/plugin-typings

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frontend-boilerplate@1.0.0 dev: `gulp`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the frontend-boilerplate@1.0.0 dev script.

Gleb
  • Power Member
  • 4708 replies
  • September 6, 2021

I don’t know what this error means, maybe you need to use gulp instead of npm?

Also I found this by googling the error message: node.js - How to solve npm error "npm ERR! code ELIFECYCLE" - Stack Overflow maybe you can find something else if you google it. But this doesn’t seem to be related to the typings, more like a local issue with your environment.


rix
  • Author
  • 2 replies
  • September 7, 2021

Thanks 👍


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