Skip to content

构建prebundle过程中依赖中的scss文件编译报错 #12672

@chenjiepds

Description

@chenjiepds

相关平台

微信小程序

小程序基础库: 2.26.2
使用框架: React

复现步骤

第三方依赖中包含scss文件,经定位是scss语法不识别导致。

期望结果

正常编译,并且有报错的具体信息

实际结果

编译报错,并且没有报错信息
👽 Taro v3.5.6

Tips:

  1. 预览模式生成的文件较大,设置 NODE_ENV 为 production 可以开启压缩。
    Example:
    $ NODE_ENV=production taro build --type weapp --watch
  2. 建议开启持久化缓存功能,能有效提升二次编译速度,详情请参考: https://docs.taro.zone/docs/config-detail#cache。

Prebundle dependencies:
@fta/components-action-sheet
@tarojs/plugin-framework-react/dist/runtime
@tarojs/plugin-platform-weapp/dist/runtime
@tarojs/runtime
@tarojs/taro
react
react-dom
react/jsx-runtime

node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#".] {
code: 'ERR_UNHANDLED_REJECTION'
}

环境信息

Taro v3.5.6


Error: Bindings not found
    at Compiler.transformSync (/usr/local/lib/node_modules/@tarojs/cli/node_modules/@swc/core/index.js:250:15)
    at Object.transformSync (/usr/local/lib/node_modules/@tarojs/cli/node_modules/@swc/core/index.js:348:21)
    at compile (/usr/local/lib/node_modules/@tarojs/cli/node_modules/@swc/register/lib/node.js:76:22)
    at compileHook (/usr/local/lib/node_modules/@tarojs/cli/node_modules/@swc/register/lib/node.js:91:16)
    at Module._compile (/usr/local/lib/node_modules/@tarojs/cli/node_modules/pirates/lib/index.js:130:29)
    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Object.newLoader [as .js] (/usr/local/lib/node_modules/@tarojs/cli/node_modules/pirates/lib/index.js:141:7)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
Error: Bindings not found
    at Compiler.transformSync (/usr/local/lib/node_modules/@tarojs/cli/node_modules/@swc/core/index.js:250:15)
    at Object.transformSync (/usr/local/lib/node_modules/@tarojs/cli/node_modules/@swc/core/index.js:348:21)
    at compile (/usr/local/lib/node_modules/@tarojs/cli/node_modules/@swc/register/lib/node.js:76:22)
    at compileHook (/usr/local/lib/node_modules/@tarojs/cli/node_modules/@swc/register/lib/node.js:91:16)
    at Module._compile (/usr/local/lib/node_modules/@tarojs/cli/node_modules/pirates/lib/index.js:130:29)
    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Object.newLoader [as .js] (/usr/local/lib/node_modules/@tarojs/cli/node_modules/pirates/lib/index.js:141:7)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
/usr/local/lib/node_modules/@tarojs/cli/node_modules/@tarojs/service/dist/utils/index.js:75
                    throw new Error(`插件依赖 "${item}" 加载失败,请检查插件配置`);
                          ^


以下信息为了提交issue,不具参考价值
Taro CLI 3.5.6 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 16.15.0 - D:\nvm_node\node.EXE
      Yarn: 1.22.19 - D:\nvm_node\yarn.CMD
      npm: 8.19.2 - D:\nvm_node\npm.CMD

Metadata

Metadata

Assignees

Labels

F-reactFramework - ReactT-weappTarget - 编译到微信小程序V-3Version - 3.xduplicateThis issue or pull request already exists

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions