Semantic-Org / Semantic-UI-CSS

CSS Only distribution
http://www.semantic-ui.com
MIT License
489 stars 360 forks source link

[ React, Webpack, yarn ] Module not found: Can't resolve '../themes/default/assets/fonts/brand-icons.eot' #52

Closed dimitar-nikovski closed 6 years ago

dimitar-nikovski commented 6 years ago

Webpack error:

Failed to compile.

./node_modules/semantic-ui-css/components/icon.min.css Module not found: Can't resolve '../themes/default/assets/fonts/brand-icons.eot' in 'H:\student-voice-client\studentvoice\node_modules\semantic-ui-css\components'.

Just for future reference, this resulted from using Webpack and yarn and if yarn autoclean is enabled with the default settings by running:

yarn autoclean --init

You could either change the settings in .yarnclean or delete it and re-run:

yarn add semantic-ui-css

hytromo commented 6 years ago

For future reference, in order to solve this problem using semantic ui 2.3.2, I had to run

gulp build-assets and then run gulp build inside the semantic folder.

For some reason, only running gulp build resulted in only icons.* to be inside the assets folder and brand-icons.* were missing.

MikeBroders commented 5 years ago

yarn autoclean added these two entries in the .yarnclean file

# asset directories
images
assets

remove them and reinstall semantic-ui-css and enjoy the theme assets