admin管理员组文章数量:1400007
@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!
本文标签: javascriptsrcAppscss (nodemodulescssloaderdistcjsjsStack Overflow
版权声明:本文标题:javascript - .srcApp.scss (.node_modulescss-loaderdistcjs.js? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744187518a2594362.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论