gpt4 book ai didi

css - `JS: Error: Css styling failed: missing ' { nativescript-dev-sass 插件中的 '`

转载 作者:行者123 更新时间:2023-11-28 02:53:50 25 4
gpt4 key购买 nike

安装 nativescript-dev-sass 插件后,我将/app 目录中的 app.css 文件重命名为 app.scss 以便我可以在其中编写 sass文件。 css 文件包含一个 import 语句,所以我将其更改为:

@import 'nativescript-theme-core/css/sky.css';

@import '~nativescript-theme-core/css/sky.css'; //notice the tilde

我正在使用此处 nativescript-dev-sass 存储库的自述文件中提到的波浪号:https://github.com/NativeScript/nativescript-dev-sass

当我运行 tns run android 时,我的应用程序启动时出现以下错误:

JS: Error: Css styling failed: Error: /data/data/io.myapp.app/files/app/app.css:1:97: missing '{'

app.scss 编译得到的 app.css 文件有以下行:

@import url(C:\my_workspace\myapp\node_modules\nativescript-theme-core\css\sky.css)

该行的第 97 列,如错误消息中所指定,是紧跟在右括号 ) 之后的那一列,实际上不应该有 {。所以我不知道为什么它说缺少 {。

我该怎么做才能解决这个问题?

最佳答案

可能是你需要使用

@import '~nativescript-theme-core/scss/sky';  // #theme variables

代替

@import '~nativescript-theme-core/css/sky.css'; //notice the tilde

关于css - `JS: Error: Css styling failed: missing ' { nativescript-dev-sass 插件中的 '`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46551234/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com