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

[BUG] Announcement icon not found #168

Open
codechefmarc opened this issue Nov 8, 2024 · 0 comments
Open

[BUG] Announcement icon not found #168

codechefmarc opened this issue Nov 8, 2024 · 0 comments
Labels

Comments

@codechefmarc
Copy link

Describe the bug
When adding the Announcement component and then compiling, there is an error that it can't find the svg icons for this component.

To Reproduce
Steps to reproduce the behavior:

  1. Note, Emulsify UI kit should already be setup and running, no steps here to do that...
  2. Install the announcement component by using emulsify install announcement or emulsify component install announcement
  3. Run npm run develop
  4. Notice the error:
ERROR in ./src/components/announcement/announcement.stories.js 3:0-94
Module not found: Error: Can't resolve '../../../assets/images/example/announcement-icon--dark.svg' in '/Users/username/4K/Sandboxes/emulsify-dev/web/themes/custom/themename/src/components/announcement'
 @ ././ lazy ^\.\/.*$ include: (?%21.*node_modules)(?:(src%7Ccomponents)(?:\/(?%21\.)(?:(?:(?%21(?:^%7C\/)\.).)*?)\/%7C\/%7C$)(?%21\.)(?=.)[^/]*?\.stories\.(js%7Cjsx%7Cts%7Ctsx))$ chunkName: [request] namespace object ./src/components/announcement/announcement.stories.js ./src/components/announcement/announcement.stories
 @ ./storybook-stories.js 10:11-14:5
 @ ./storybook-config-entry.js 6:0-50 17:31-39 24:2-27:4 24:58-27:3 26:31-39

ERROR in ./src/components/announcement/announcement.stories.js 4:0-96
Module not found: Error: Can't resolve '../../../assets/images/example/announcement-icon--light.svg' in '/Users/username/4K/Sandboxes/emulsify-dev/web/themes/custom/themename/src/components/announcement'
 @ ././ lazy ^\.\/.*$ include: (?%21.*node_modules)(?:(src%7Ccomponents)(?:\/(?%21\.)(?:(?:(?%21(?:^%7C\/)\.).)*?)\/%7C\/%7C$)(?%21\.)(?=.)[^/]*?\.stories\.(js%7Cjsx%7Cts%7Ctsx))$ chunkName: [request] namespace object ./src/components/announcement/announcement.stories.js ./src/components/announcement/announcement.stories
 @ ./storybook-stories.js 10:11-14:5
 @ ./storybook-config-entry.js 6:0-50 17:31-39 24:2-27:4 24:58-27:3 26:31-39

preview compiled with 2 errors
=> Failed to build the preview
  1. If you comment these lines from src/components/announcement/announcement.stories.js:
import announcementDarkIcon from '../../../assets/images/example/announcement-icon--dark.svg';
import announcementLightIcon from '../../../assets/images/example/announcement-icon--light.svg';

And then re-run npm run develop, it works fine.

Expected behavior
Icons should be in the repo and the build should work.

Desktop (please complete the following information):

  • OS: macOS Sonoma 14.7
  • Browser: N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant