javascript - .srcApp.scss (.node_modulescss-loaderdistcjs.js? - Stack Overflow

@font-face {font-family: 'Ageya';src: url('.srcfontsAgeya.otf'), format('ot

@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
Add a ment  | 

2 Answers 2

Reset to default 2

Its 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!

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744187518a4562277.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信