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

Copied links need to be in quotes in the CLI #7

Open
sekeidesign opened this issue Apr 16, 2024 · 7 comments
Open

Copied links need to be in quotes in the CLI #7

sekeidesign opened this issue Apr 16, 2024 · 7 comments

Comments

@sekeidesign
Copy link

I had originally started writing this issue because I kept getting errors when trying to scaffold a new component.
Although this is a minor issue, I can see some people getting hung up on it. The solution is simply to wrap the copied link in quotes to make sure the command doesn't break.

I think the instructions should reflect this, saying something like

npx figma connect create "https://..." --token <auth token>

CleanShot 2024-04-16 at 16 19 42@2x

@tomduncalf-figma
Copy link

tomduncalf-figma commented Apr 17, 2024

Hey @sekeidesign, interesting that you have this issue! On my Mac, in both iTerm 2 and Apple Terminal, pasting a URL with ? or = characters automatically escapes it, see this video:

Untitled.mov

What terminal software are you using?

We'll look to add a note about this in any case!

@devindoming0
Copy link

devindoming0 commented Apr 17, 2024

I too also encountered the put the Copy Link to Selection URL of the component set into "" issue. I am using VS Code's built-in terminal

There seems to be a fxn on line 41 in helpers.js that validates if the URL is a string that is showing this error

Screenshot 2024-04-17 at 10 26 09 AM

@tomduncalf-figma
Copy link

Interesting, it seems that some terminals must not escape special characters when you paste. It's strange because when I try the same on the VS Code terminal, it correctly changes ? to \? and = to \=. Maybe there is some configuration settings which controls this.

In any case, the solution @devindoming0 is to wrap the URL in quotes if your terminal doesn't escape it. We'll update the README to reflect this.

Thanks for the report!

@Julian-B90
Copy link

Julian-B90 commented Apr 17, 2024

Same issue her with Windows PowerShell in VS-Code:

PowerShell:
image

WSL:
image

@sekeidesign
Copy link
Author

Hey @sekeidesign, interesting that you have this issue! On my Mac, in both iTerm 2 and Apple Terminal, pasting a URL with ? or = characters automatically escapes it, see this video:

Untitled.mov
What terminal software are you using?

We'll look to add a note about this in any case!

I use Warp as my terminal!

@michal-szymczak-ui-developer

Hey everyone
In my case (Windows VSCode - default terminal / powershell) passing url in "" doesn't helped. I was getting:

'node-id' is not recognized as an internal or external command,
operable program or batch file.
Invalid parameter - =dev

In my case the "Git Bash" terminal was the one that worked!

@ptomas-figma
Copy link
Collaborator

@michal-szymczak-ui-developer could you share the command that failed in Windows VS Code?

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

No branches or pull requests

6 participants