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

sass 样式打包问题 #11588

Closed
ksh033 opened this issue Apr 7, 2022 · 2 comments · Fixed by #11614
Closed

sass 样式打包问题 #11588

ksh033 opened this issue Apr 7, 2022 · 2 comments · Fixed by #11614
Assignees
Labels
F-react Framework - React T-rn Target - 编译到 React Native V-3 Version - 3.x

Comments

@ksh033
Copy link

ksh033 commented Apr 7, 2022

相关平台

React Native

使用框架: React

复现步骤

在app.scss文件
@import "~taro-ui/dist/style/index.scss";

期望结果

编译正常

实际结果

error: src\app.scss: Call retries were exceeded
transform[stderr]: D:\stu\react\native\cashapp\node_modules\metro-transform-worker\node_modules\metro-hermes-compiler\src\emhermesc.js:77
transform[stderr]: throw ex;
transform[stderr]: ^
transform[stderr]:
transform[stderr]: Invalid argument(s): Uri d:%5Cstu%5Creact%5Cnative%5Ccashapp%5Csrc%5Cstyle%5Cindex.scss must have scheme 'file:'.
transform[stderr]: at Object.wrapException (D:\stu\react\native\cashapp\node_modules@tarojs\rn-style-transformer\node_modules\sass\sass.dart.js:1240:17)
transform[stderr]: at WindowsStyle.pathFromUri$1 (D:\stu\react\native\cashapp\node_modules@tarojs\rn-style-transformer\node_modules\sass\sass.dart.js:33233:17)
transform[stderr]: at StaticClosure.fromUri (D:\stu\react\native\cashapp\node_modules@tarojs\rn-style-transformer\node_modules\sass\sass.dart.js:16172:37)
transform[stderr]: at Object.NullableExtension_andThen0 (D:\stu\react\native\cashapp\node_modules@tarojs\rn-style-transformer\node_modules\sass\sass.dart.js:18507:40)
transform[stderr]: at Object._wrapException (D:\stu\react\native\cashapp\node_modules@tarojs\rn-style-transformer\node_modules\sass\sass.dart.js:13056:14)
transform[stderr]: at _render_closure1.call$2 (D:\stu\react\native\cashapp\node_modules@tarojs\rn-style-transformer\node_modules\sass\sass.dart.js:82010:21)
transform[stderr]: at _RootZone.runBinary$3$3 (D:\stu\react\native\cashapp\node_modules@tarojs\rn-style-transformer\node_modules\sass\sass.dart.js:27550:18)
transform[stderr]: at _FutureListener.handleError$1 (D:\stu\react\native\cashapp\node_modules@tarojs\rn-style-transformer\node_modules\sass\sass.dart.js:26099:19)
transform[stderr]: at _Future__propagateToListeners_handleError.call$0 (D:\stu\react\native\cashapp\node_modules@tarojs\rn-style-transformer\node_modules\sass\sass.dart.js:26397:49)
transform[stderr]: at Object._Future__propagateToListeners (D:\stu\react\native\cashapp\node_modules@tarojs\rn-style-transformer\node_modules\sass\sass.dart.js:4550:77) {
transform[stderr]: dartException: <ref *1> ArgumentError {

环境信息

👽 Taro v3.4.3


  Taro CLI 3.4.3 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 16.14.2 - D:\workspace\nodejs\node.EXE
      Yarn: 1.22.18 - D:\workspace\nvm\npm\global\yarn.CMD
      npm: 8.5.0 - D:\workspace\nodejs\npm.CMD

补充信息

Taro v3.4.3

@taro-bot2 taro-bot2 bot added F-react Framework - React T-rn Target - 编译到 React Native V-3 Version - 3.x labels Apr 7, 2022
@zhiqingchen
Copy link
Member

vitejs/vite#4026 rn-style-transformer 引用sass版本问题

@zhiqingchen
Copy link
Member

"resolutions": {
"sass": "1.38.0"

可先锁定到某一版本解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-rn Target - 编译到 React Native V-3 Version - 3.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants