ไม่สามารถนำเข้า/ใช้ธีมสีเข้มของแกน Nativescript ได้

ฉันกำลังพยายามนำเข้า/ใช้ธีม Nativescript สีเข้มเริ่มต้น และได้รับข้อผิดพลาดต่อไปนี้ มีความคิดอะไรบ้างที่ฉันทำอะไรผิด?

ข้อผิดพลาด: JS: ข้อผิดพลาด: การจัดสไตล์ Css ล้มเหลว: ข้อผิดพลาด: ไม่ได้กำหนด: 1:10: หายไป '{'

app.css ของฉัน:

@ นำเข้า 'nativescript-theme-core/css/core.dark.css';


person user2094257    schedule 25.12.2016    source แหล่งที่มา
comment
NativeScript เวอร์ชันใด ธีมเวอร์ชั่นไหน?   -  person Nathanael    schedule 26.12.2016
comment
@Nathanael ฉันใช้ Nativescript v2.4.2 และ Nativescript theme-core ^0.1.3   -  person user2094257    schedule 26.12.2016
comment
ฉันจะพยายามดำเนินการ npm install nativescript-theme-core@latest และดูว่าจะช่วยแก้ไขปัญหาของคุณได้หรือไม่ 0.1.3 เป็นธีมเวอร์ชันแรกๆ   -  person Nathanael    schedule 26.12.2016
comment
@Nathanael ฉันเริ่มโปรเจ็กต์ใหม่ลบแพ็คเกจ Nativescript-theme-core และทำการติดตั้ง npm install Nativescript-theme-core@latest 1.0.2 แต่ฉันยังคงได้รับข้อผิดพลาดเดียวกัน ยกเว้นตอนนี้มันบอกว่า undefin1:9 แทน 1:10... รู้ไหมว่านี่จะเป็นอะไรอีก?   -  person user2094257    schedule 27.12.2016
comment
อืม ฉันเพิ่งทดสอบสิ่งนี้และมันใช้ได้กับฉันบน Android tns create tnstestcss จากนั้น npm i nativescript-theme-core@latest --save จากนั้น tns platform add android จากนั้นแก้ไข app.css ไฟล์และแทนที่ light ด้วย dark บันทึกแล้ว พิมพ์ tns run android และเริ่มต้นได้โดยไม่มีปัญหา บางทีโปรแกรมแก้ไขของคุณอาจบันทึกขยะเพิ่มเติมลงในไฟล์หรือพยายามแปลงเป็นไฟล์ utf-8   -  person Nathanael    schedule 28.12.2016
comment
@Nathanael ฉันมี styleUrls: ['./app.css'] ซึ่งทำให้ฉันเกิดข้อผิดพลาดนั้น ... ฉันไม่รู้ว่าธีมนี้สามารถเข้าถึงได้ทั่วโลก ...   -  person user2094257    schedule 31.12.2016


คำตอบ (1)


ปรากฎว่าฉันมี styleUrls: ['./app.css'] ในคำจำกัดความองค์ประกอบของฉัน... การลบสิ่งนั้นเพื่อแก้ไขปัญหานี้...

person user2094257    schedule 31.12.2016