我是 Angular 6 的新手,在我的项目中出现以下错误
ERROR in multi ./node_modules/bootstrap/dist/css/bootstrap.min.css ./styles.css
Module not found: Error: Can't resolve 'C:\Users\User\e-CommerceWebsite\styles.css' in 'C:\Users\User\e-CommerceWebsite'
并且浏览器显示
cannot Get
角.json
"styles": [
"./node_modules/bootstrap/dist/css/bootstrap.min.css",
"styles.css"
],
"scripts": [
"./node_modules/jquery/dist/jquery.min.js",
"./node_modules/popper.js/dist/popper.min.js",
"./node_modules/bootstrap/dist/js/bootstrap.min.js"
]
样式.css
@import '~bootstrap/dist/css/bootstrap.min.css';
...
...
...
参考这个: 引导程序没有连接到角度6?
谁能帮我解决这个错误。
原文由 Zhu 发布,翻译遵循 CC BY-SA 4.0 许可协议
当您输入错误的路径或您输入的文件不在该目录中时,会发生这种情况。
在您的情况下,“styles.css”路径是错误的。它应该是“src/styles.css”