Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown word\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser #4095

Open
chenzhaoguang opened this issue Aug 7, 2019 · 2 comments
Labels
V-1 Version - 1.x

Comments

@chenzhaoguang
Copy link

生成 替换代码 为文件 /Users/mac/Desktop/workSpace/dm-run-weixinapp/src/pages/mine/index.tsx 生成 css modules
错误 页面编译 页面/Users/mac/Desktop/workSpace/dm-run-weixinapp/src/pages/mine/index编译失败!
CssSyntaxError {
name: 'CssSyntaxError',
reason: 'Unknown word',
file:
'/Users/mac/Desktop/workSpace/dm-run-weixinapp/src/pages/mine/index.scss',
source:
'@import '@/assets/scss/variables.scss';\n@import '@/assets/scss/mixins.scss';\n.mineContainer{\n background-color: #FFF;\n .swiperContainer{\n height: 176px;\n margin-left: 32px;\n margin-right: 32px;\n margin-bottom: 24px;\n .swiperItem{\n width: 100%;\n height: 100%;\n border-radius: 20px;\n }\n }\n}\n.mineHeader{\n display: flex;\n width: 100%;\n flex-direction: row;\n align-items: flex-start;\n justify-content: flex-start;\n height: 252px;\n padding: 32px 35px 70px 32px;\n background:linear-gradient(180deg,rgba(152,245,149,1) 0%,rgba(37,192,131,1) 100%);\n}\n.mineInfo{\n flex:1 1 auto;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: flex-start;\n}\n.minePhotos{\n flex:0 0 112px;\n height: 112px;\n margin-right: 24px;\n background: url($static+'/mine/default.png') center center/112px 112px no-repeat;\n border-radius: 100%;\n}\n.mineSummary{\n flex: 1 1 auto;\n}\n.mineBase{\n min-height:45px;\n line-height:45px;\n font-size:32px;\n font-family:'PingFangSC-Medium';\n font-weight:500;\n color:#000;\n margin-bottom: 14px;\n}\n.mineDesc{\n min-height:37px;\n line-height:37px;\n font-size:26px;\n font-family:'PingFangSC-Regular';\n font-weight:400;\n color:#6544;\n}\n.mineEnsure,.mineUnReceive,.minePending{\n &::before,&::after{\n display: inline-block;\n content: '';\n background-repeat: no-repeat;\n background-position: 0 0;\n background-size: 100%;\n }\n &::before{\n width: 40px;\n height: 41px;\n vertical-align: -10px;\n margin-right: 12px;\n background-image: url($static+'/mine/ensure.png');\n }\n &::after{\n width: 20px;\n height: 20px;\n vertical-align: 0;\n margin-left: 4px;\n background-image: url($static+'/mine/arrow-r2.png');\n }\n}\n.mineUnReceive{\n &::before{\n // width: 40px;\n // height: 41px;\n // margin-right: 12px;\n background-image: url($static+'/mine/unrecevie.png');\n }\n}\n.minePending{\n &::before{\n // width: 40px;\n // height: 41px;\n // margin-right: 12px;\n background-image: url($static+'/mine/pending.png');\n }\n}\n.mineOther{\n flex:0 0 140px;\n height: 114px;\n background-position: right center;\n background-repeat: no-repeat;\n background-size: 128px 114px;\n}\n.mineOrder{\n position: relative;\n display: flex;\n width: 100%;\n height:200px;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n.mineOrderContainer{\n position: relative;\n z-index: 11;\n margin: -70px 32px 24px;\n background:#FFF;\n box-shadow:0px 2px 16px 0px rgba(0,0,0,0.1);\n border-radius:20px;\n}\n.mineOrderItem{\n flex: 0 1 50%;\n min-height: 76px;\n text-align: center;\n &.line{\n &::before{\n position: absolute;\n left: 50%;\n top:50%;\n width: 2px;\n height: 152px;\n content: '';\n background-color: #F2F2F2;\n transform: translate(-50%,-25%) scale(0.5,0.5);\n transform-origin: 0 0;\n }\n }\n}\n.mineOrderItemHd{\n line-height:33px;\n font-size:24px;\n font-family:'PingFangSC-Regular';\n font-weight:400;\n color:#909090;\n}\n.mineOrderItemBd{\n height: 70px;\n line-height:59px;\n font-size:48px;\n font-family:'DIN-Black';\n font-weight:900;\n .unit{\n line-height:33px;\n font-size:24px;\n }\n}\n.mineOrderPolicy{\n line-height:40px;\n font-size:28px;\n font-family:'PingFangSC-Regular';\n font-weight:400;\n color:#091A32;\n padding-top: 24px;\n // color:#1C1F32;\n .unit{\n font-family:'PingFangSC-Semibold';\n font-weight:600;\n color:#091A32;\n }\n}\n.mineOrderCash{\n color: #F78925;\n .unit{\n font-family:'PingFangSC-Medium';\n color:#F8A152;\n font-weight:500;\n }\n // text:only-child{\n // font-size: 40px;\n // }\n}\n.mineOrderImg{\n width: 126px;\n height: 48px;\n margin-top: -8px;\n}\n.mineNav{\n margin-top: 24px;\n padding-right: 32px;\n padding-left: 32px;\n}\n.mineNavItem{\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n width: 100%;\n height: 122px;\n overflow: hidden;\n // box-shadow:0px 1px 0px 0px rgba(230,230,230,1);\n &::after{\n position: absolute;\n width: 200%;\n height: 2px;\n bottom: 0;\n left: 0;\n content: '';\n transform: scale(0.5);\n transform-origin: 0 0;\n background-color: #e6e6e6;\n }\n}\n.mineNavItemArrow{\n padding-right: 58px;\n background: url($static+'/mine/arrow-r.png') right center/26px 26px no-repeat;\n}\n.mineNavItemHd{\n flex:1 1 50%;\n height:42px;\n line-height:42px;\n font-size:30px;\n font-family:'PingFangSC-Medium';\n font-weight:500;\n color:#1C1F32;\n padding-left: 68px;\n background-position: 0 center;\n background-size: 44px 44px;\n background-repeat: no-repeat;\n}\n.mineNavItemBd{\n display: flex;\n justify-content: flex-end;\n flex:1 1 50%;\n height:40px;\n line-height:40px;\n font-size:28px;\n font-family:'PingFangSC-Regular';\n font-weight:400;\n color:#909090;\n}\n\n.mineIconHelp{\n background-image: url($static+'/mine/help.png');\n}\n.mineIconCustomer{\n background-image: url($static+'/mine/customer.png');\n}\n.mineIconAbout{\n background-image: url($static+'/mine/about.png');\n}',
line: 183,
column: 5,
message:
'/Users/mac/Desktop/workSpace/dm-run-weixinapp/src/pages/mine/index.scss:183:5: Unknown word\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser',
input:
{ line: 183,
column: 5,
source:
'@import '@/assets/scss/variables.scss';\n@import '@/assets/scss/mixins.scss';\n.mineContainer{\n background-color: #FFF;\n .swiperContainer{\n height: 176px;\n margin-left: 32px;\n margin-right: 32px;\n margin-bottom: 24px;\n .swiperItem{\n width: 100%;\n height: 100%;\n border-radius: 20px;\n }\n }\n}\n.mineHeader{\n display: flex;\n width: 100%;\n flex-direction: row;\n align-items: flex-start;\n justify-content: flex-start;\n height: 252px;\n padding: 32px 35px 70px 32px;\n background:linear-gradient(180deg,rgba(152,245,149,1) 0%,rgba(37,192,131,1) 100%);\n}\n.mineInfo{\n flex:1 1 auto;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: flex-start;\n}\n.minePhotos{\n flex:0 0 112px;\n height: 112px;\n margin-right: 24px;\n background: url($static+'/mine/default.png') center center/112px 112px no-repeat;\n border-radius: 100%;\n}\n.mineSummary{\n flex: 1 1 auto;\n}\n.mineBase{\n min-height:45px;\n line-height:45px;\n font-size:32px;\n font-family:'PingFangSC-Medium';\n font-weight:500;\n color:#000;\n margin-bottom: 14px;\n}\n.mineDesc{\n min-height:37px;\n line-height:37px;\n font-size:26px;\n font-family:'PingFangSC-Regular';\n font-weight:400;\n color:#6544;\n}\n.mineEnsure,.mineUnReceive,.minePending{\n &::before,&::after{\n display: inline-block;\n content: '';\n background-repeat: no-repeat;\n background-position: 0 0;\n background-size: 100%;\n }\n &::before{\n width: 40px;\n height: 41px;\n vertical-align: -10px;\n margin-right: 12px;\n background-image: url($static+'/mine/ensure.png');\n }\n &::after{\n width: 20px;\n height: 20px;\n vertical-align: 0;\n margin-left: 4px;\n background-image: url($static+'/mine/arrow-r2.png');\n }\n}\n.mineUnReceive{\n &::before{\n // width: 40px;\n // height: 41px;\n // margin-right: 12px;\n background-image: url($static+'/mine/unrecevie.png');\n }\n}\n.minePending{\n &::before{\n // width: 40px;\n // height: 41px;\n // margin-right: 12px;\n background-image: url($static+'/mine/pending.png');\n }\n}\n.mineOther{\n flex:0 0 140px;\n height: 114px;\n background-position: right center;\n background-repeat: no-repeat;\n background-size: 128px 114px;\n}\n.mineOrder{\n position: relative;\n display: flex;\n width: 100%;\n height:200px;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n.mineOrderContainer{\n position: relative;\n z-index: 11;\n margin: -70px 32px 24px;\n background:#FFF;\n box-shadow:0px 2px 16px 0px rgba(0,0,0,0.1);\n border-radius:20px;\n}\n.mineOrderItem{\n flex: 0 1 50%;\n min-height: 76px;\n text-align: center;\n &.line{\n &::before{\n position: absolute;\n left: 50%;\n top:50%;\n width: 2px;\n height: 152px;\n content: '';\n background-color: #F2F2F2;\n transform: translate(-50%,-25%) scale(0.5,0.5);\n transform-origin: 0 0;\n }\n }\n}\n.mineOrderItemHd{\n line-height:33px;\n font-size:24px;\n font-family:'PingFangSC-Regular';\n font-weight:400;\n color:#909090;\n}\n.mineOrderItemBd{\n height: 70px;\n line-height:59px;\n font-size:48px;\n font-family:'DIN-Black';\n font-weight:900;\n .unit{\n line-height:33px;\n font-size:24px;\n }\n}\n.mineOrderPolicy{\n line-height:40px;\n font-size:28px;\n font-family:'PingFangSC-Regular';\n font-weight:400;\n color:#091A32;\n padding-top: 24px;\n // color:#1C1F32;\n .unit{\n font-family:'PingFangSC-Semibold';\n font-weight:600;\n color:#091A32;\n }\n}\n.mineOrderCash{\n color: #F78925;\n .unit{\n font-family:'PingFangSC-Medium';\n color:#F8A152;\n font-weight:500;\n }\n // text:only-child{\n // font-size: 40px;\n // }\n}\n.mineOrderImg{\n width: 126px;\n height: 48px;\n margin-top: -8px;\n}\n.mineNav{\n margin-top: 24px;\n padding-right: 32px;\n padding-left: 32px;\n}\n.mineNavItem{\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n width: 100%;\n height: 122px;\n overflow: hidden;\n // box-shadow:0px 1px 0px 0px rgba(230,230,230,1);\n &::after{\n position: absolute;\n width: 200%;\n height: 2px;\n bottom: 0;\n left: 0;\n content: '';\n transform: scale(0.5);\n transform-origin: 0 0;\n background-color: #e6e6e6;\n }\n}\n.mineNavItemArrow{\n padding-right: 58px;\n background: url($static+'/mine/arrow-r.png') right center/26px 26px no-repeat;\n}\n.mineNavItemHd{\n flex:1 1 50%;\n height:42px;\n line-height:42px;\n font-size:30px;\n font-family:'PingFangSC-Medium';\n font-weight:500;\n color:#1C1F32;\n padding-left: 68px;\n background-position: 0 center;\n background-size: 44px 44px;\n background-repeat: no-repeat;\n}\n.mineNavItemBd{\n display: flex;\n justify-content: flex-end;\n flex:1 1 50%;\n height:40px;\n line-height:40px;\n font-size:28px;\n font-family:'PingFangSC-Regular';\n font-weight:400;\n color:#909090;\n}\n\n.mineIconHelp{\n background-image: url($static+'/mine/help.png');\n}\n.mineIconCustomer{\n background-image: url($static+'/mine/customer.png');\n}\n.mineIconAbout{\n background-image: url($static+'/mine/about.png');\n}',
file:
'/Users/mac/Desktop/workSpace/dm-run-weixinapp/src/pages/mine/index.scss' } }

taro 版本 "@tarojs/taro": "1.3.9",

@taro-bot
Copy link

taro-bot bot commented Aug 7, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@Elliott-Hu
Copy link

我也碰到这个问题了。在我的电脑上不会,帮同事安装环境就遇到了

@ZakaryCode ZakaryCode added the V-1 Version - 1.x label Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V-1 Version - 1.x
Projects
None yet
Development

No branches or pull requests

3 participants