@font-face {
font-family: 'Ageya';
src: url('./src/fonts/Ageya.otf'), format('otf');
}
@font-face {
font-family: 'Ageya';
src: url('./src/fonts/Ageya.ttf');
}
it shows the error
ERROR in ./src/App.scss (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[7].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[7].use[2]!./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[1].oneOf[7].use[3]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[7].use[4]!./src/App.scss) 5:36-85
Module not found: Error: Can't resolve './src/fonts/Ageya.otf' in 'D:\project\linkstore\src'
@font-face {
font-family: 'Ageya';
src: url('./src/fonts/Ageya.otf'), format('otf');
}
@font-face {
font-family: 'Ageya';
src: url('./src/fonts/Ageya.ttf');
}
it shows the error
ERROR in ./src/App.scss (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[7].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[7].use[2]!./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[1].oneOf[7].use[3]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[7].use[4]!./src/App.scss) 5:36-85
Module not found: Error: Can't resolve './src/fonts/Ageya.otf' in 'D:\project\linkstore\src'
Share Improve this question asked Jun 7, 2022 at 15:13 RaziRazzRaziRazz 111 gold badge1 silver badge1 bronze badge 1- 1 stackoverflow./help/how-to-ask – JBaczuk Commented Jun 7, 2022 at 15:14
2 Answers
Reset to default 2Its sometimes when change the file alerted/rename/move
into another files/folder
, you may find this error , try
"npm rebuild node-sass"
in your frontend code terminal, it might solve the issue
it will rebuild the dependencies successful
Are you also doing that Free Code Camp React portfolio tutorial? I had this issue. You just need to make sure you have the actual font files in your /src folder.
You'll need to track down the "Ageya.otf" font file online and put it in your /src folder. You can google "free download ageya font". If it exists in a different format, just change the format appropriately.
For instance, if you find a download for "Ageya.ttf", you'll need to change:
src: url('./src/fonts/Ageya.otf'), format('otf');
to
src: url('./src/fonts/Ageya.ttf'), format('ttf');
Hope this is helpful!