jacobparis-insiders / sly

Monorepo for Sly CLI
https://sly-cli.fly.dev/
157 stars 11 forks source link

Phosphor icons Unexpected token error #65

Open PabloCorso opened 2 weeks ago

PabloCorso commented 2 weeks ago

I'm having an issue when trying to add the phosphor-icons package using the @sly-cli/sly tool. Not sure if I'm using it right.

Using:

npx @sly-cli/sly add phosphor-icons sparkle

Output:

SyntaxError: Unexpected token 'U', "Unexpected"... is not valid JSON
Error: Failed to fetch registry from https://sly-cli.fly.dev.
file:///path/to/project/node_modules/@sly-cli/sly/dist/index.js:288
    throw new Error(`Failed to fetch tree from registry.`);
          ^

Error: Failed to fetch tree from registry.
    at file:///path/to/project/node_modules/@sly-cli/sly/dist/index.js:288:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async fetchTree (file:///path/to/project/node_modules/@sly-cli/sly/dist/index.js:280:18)
    at async Command.<anonymous> (file:///path/to/project/node_modules/@sly-cli/sly/dist/index.js:618:19)
jacobparis commented 2 weeks ago

Ah sorry about this, for phosphor there's variants for each icon and I accidentally left the basename in the registry. Fetching the specific one will work and I'll update the registry to remove the basename sparkle item

image
PabloCorso commented 2 weeks ago

Good catch, thank you for your help!