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

not an integration? #167

Closed
mvolkmann opened this issue Dec 24, 2023 · 9 comments
Closed

not an integration? #167

mvolkmann opened this issue Dec 24, 2023 · 9 comments

Comments

@mvolkmann
Copy link

I get the following when I enter npx astro add astro-icon:

⚠ astro-icon is not an official Astro package. Use at your own risk!
✔ Continue? … yes
✖ astro-icon doesn't appear to be an integration or an adapter. Find our official integrations at https://astro.build/integrations

@myakura
Copy link

myakura commented Dec 24, 2023

@mvolkmann
Copy link
Author

Nice! How can I use astro-icon before that change is merged?

@stramel
Copy link
Collaborator

stramel commented Dec 24, 2023

Hey @mvolkmann! 👋🏼 Yes, the astro add command won't work until we publish the new integration.

For now use the manual instructions but install using npm i astro-icon@next to get the V1 changes.

@mvolkmann mvolkmann reopened this Dec 24, 2023
@mvolkmann
Copy link
Author

mvolkmann commented Dec 24, 2023

I tried that, but this fails because it can't find astro-icon.

import { Icon } from "astro-icon";

I do have an astro-icon directory in my node_modules directory.
I did modify astro.config.mjs as described in the "Manual Install" documentation.
Could the issue be that the package.json file for astro-icon doesn't specify the main property?

@myakura
Copy link

myakura commented Dec 25, 2023

@mvolkmann you might want to check out those guides:

Getting Started | Astro Icon
https://www.astroicon.dev/getting-started/

Upgrade to Astro Icon v1 | Astro Icon
https://www.astroicon.dev/guides/upgrade/v1/
(in case you have an old v0.x version in your project)

@pietrociatta
Copy link

Thank you, installing via npm i astro-icon@next solved for me 👍 .

By the way trying to installing a custom svg icon by putting it insto src/icons/ folder gives me this error :

Unable to load the "local" icon set!
It looks like the "local" set was not loaded.

Did you forget to create the icon directory or to update your config?

@natemoo-re
Copy link
Owner

This should be resolved now that #162 has been merged!

@natemoo-re
Copy link
Owner

@pietrociatta please open a new issue for any bugs encountered using v1.0.0!

@mvolkmann
Copy link
Author

I can confirm this is working for me now. I documented the steps I used at https://mvolkmann.github.io/blog/topics/#/blog/astro/. See the "Icons" section.

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

5 participants