最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin4浏览0评论
@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!

发布评论

评论列表(0)

  1. 暂无评论