Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error importing Vue.js implemented Figma plugins in Figma for Linux #352

Closed
ahmedabdelkafi1 opened this issue Nov 30, 2023 · 3 comments
Closed

Comments

@ahmedabdelkafi1
Copy link

  • App version:0.11.1 , 0.11.2
  • The output of screenfetch:
  • Type of installed package (Snap, AppImage, deb, rpm, pacman): npm

Bug description
I'm encountering difficulties importing Figma plugins implemented with Vue.js into the Figma desktop application for Linux. Every time I attempt to import a plugin, I receive an error message stating "Pending Promise (id: '43') reject via error: Error". Even after trying multiple different plugins, the issue persists consistently.

Screenshots
image
image

Additional context
Here is an example of a project I tested. https://github.com/ahmedabdelkafi1/hello-world-plugin

@flytaly
Copy link

flytaly commented Dec 2, 2023

I had the same problem. Turned out it was because of this regular expression that doesn't allow slashes.

  private validateFileName(file: WebApi.WriteNewExtensionDirectoryToDiskFile) {
   ....
     !/^\w+(?:\.\w+)*\.\w+/.test(file.name) ||
   ...

Which means you can't reference paths like dist/code.js in manifest. So just create a copy of the manifest in dist folder and replace "dist/code.js" -> "code.js", "dist/index.html" -> "index.html"

@ahmedabdelkafi1
Copy link
Author

@flytaly Thank you very much! The solution worked perfectly!

@ChugunovRoman
Copy link
Collaborator

@flytaly Thank you for your investigation into the cause

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants