安装带有 angular 模块的 bulma css 时找不到
when installing bulma css with angular module is not found
我正在尝试使用 ng serve 命令启动 Angular。
而我马上运行进入下面的issue
ERROR in multi ./src/styles.scss ../node_modules/bulma/css/bulma.css
Module not found: Error: Can't resolve
'C:\client\node_modules\bulma\css\bulma.css' in 'C:\client\ngpop'
我可以确认 bulma.css 存在于该位置。
任何想法
我想你忘了添加 "node_modules/bulma/css/bulma.css"
angular.json 文件样式数组,如下所示
Angular 6 及以上 在样式数组下的 angular.json 文件中添加如下内容。
"styles": [
"node_modules/bulma/css/bulma.css",
]
Angular 2/4/5 你可以在 angular-cli.json 文件下的样式数组
"styles": [
"../node_modules/bulma/css/bulma.css",
]
希望这会有所帮助
这个解决方案对我有用,使用的版本是 Angular8
,在 angular.json
:
"styles": ["node_modules/bulma/css/bulma.min.css", "src/styles.scss"]
我正在尝试使用 ng serve 命令启动 Angular。
而我马上运行进入下面的issue
ERROR in multi ./src/styles.scss ../node_modules/bulma/css/bulma.css Module not found: Error: Can't resolve 'C:\client\node_modules\bulma\css\bulma.css' in 'C:\client\ngpop'
我可以确认 bulma.css 存在于该位置。
任何想法
我想你忘了添加 "node_modules/bulma/css/bulma.css"
angular.json 文件样式数组,如下所示
Angular 6 及以上 在样式数组下的 angular.json 文件中添加如下内容。
"styles": [
"node_modules/bulma/css/bulma.css",
]
Angular 2/4/5 你可以在 angular-cli.json 文件下的样式数组
"styles": [
"../node_modules/bulma/css/bulma.css",
]
希望这会有所帮助
这个解决方案对我有用,使用的版本是 Angular8
,在 angular.json
:
"styles": ["node_modules/bulma/css/bulma.min.css", "src/styles.scss"]