Closed enjoylee-lionjoy closed 1 year ago
按照百度到的某个教程 安装了c++依赖重启电脑后,依旧存在这个问题。删除node_modules文件夹后 重新安装依赖依旧存在。代码并未做任何更改,严格按照官方文档要求一步一步操作。
https://github.com/zhiqingchen/taro-test
参考,正常通过编译的分支
按照百度到的某个教程 安装了c++依赖重启电脑后,依旧存在这个问题。删除node_modules文件夹后 重新安装依赖依旧存在。代码并未做任何更改,严格按照官方文档要求一步一步操作。
解决了吗?我也遇到类似的问题 不过我只是正常Taro小程序项目
加一 求解决了么
的确有收到不少同学反馈,swc 插件在 Windows 下需要安装 C++ 环境:https://github.com/NervJS/taro/issues/12676
各位可以安装 C++ 环境后,删除 node_modules 和 lockfile 后再试试的
@enjoylee-lionjoy 我今天遇到了一样的问题,node 从14 升级到16、18后,去掉了所有的lockfile,也重新安装了npm包,问题还是存在,后面在这里找到了答案:https://github.com/swc-project/swc/issues/5616#issuecomment-1715561365。
@swc/core
使用1.3.84
版本
"@swc/core": "1.3.84"
相关平台
React Native
使用框架: React
复现步骤
期望结果
执行成功
实际结果
👽 Taro v3.6.6
Error: Bindings not found at Compiler.transformSync (E:\baJoinApp\bajiaoren\node_modules\@swc\core\index.js:250:15) at Object.transformSync (E:\baJoinApp\bajiaoren\node_modules\@swc\core\index.js:348:21) at compile (E:\baJoinApp\bajiaoren\node_modules\@swc\register\lib\node.js:76:22) at compileHook (E:\baJoinApp\bajiaoren\node_modules\@swc\register\lib\node.js:91:16) at Module._compile (E:\baJoinApp\bajiaoren\node_modules\pirates\lib\index.js:113:29) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) at Object.newLoader [as .js] (E:\baJoinApp\bajiaoren\node_modules\pirates\lib\index.js:121:7) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) at Module.require (node:internal/modules/cjs/loader:1141:19) Error: Bindings not found at Compiler.transformSync (E:\baJoinApp\bajiaoren\node_modules\@swc\core\index.js:250:15) at Object.transformSync (E:\baJoinApp\bajiaoren\node_modules\@swc\core\index.js:348:21) at compile (E:\baJoinApp\bajiaoren\node_modules\@swc\register\lib\node.js:76:22) at compileHook (E:\baJoinApp\bajiaoren\node_modules\@swc\register\lib\node.js:91:16) at Module._compile (E:\baJoinApp\bajiaoren\node_modules\pirates\lib\index.js:113:29) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) at Object.newLoader [as .js] (E:\baJoinApp\bajiaoren\node_modules\pirates\lib\index.js:121:7) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) at Module.require (node:internal/modules/cjs/loader:1141:19) E:\baJoinApp\bajiaoren\node_modules\@tarojs\service\dist\utils\index.js:89 throw new Error(
插件依赖 "${item}" 加载失败,请检查插件配置
); ^Error: 插件依赖 "E:\baJoinApp\bajiaoren\node_modules\@tarojs\cli\dist\presets\index.js" 加载失败,请检查插件配置 at apply (E:\baJoinApp\bajiaoren\node_modules\@tarojs\service\dist\utils\index.js:89:31) at Kernel.initPreset (E:\baJoinApp\bajiaoren\node_modules\@tarojs\service\dist\Kernel.js:117:38) at Kernel.resolvePresets (E:\baJoinApp\bajiaoren\node_modules\@tarojs\service\dist\Kernel.js:92:18) at Kernel.initPresetsAndPlugins (E:\baJoinApp\bajiaoren\node_modules\@tarojs\service\dist\Kernel.js:86:14) at Kernel. (E:\baJoinApp\bajiaoren\node_modules\@tarojs\service\dist\Kernel.js:306:18)
at Generator.next ()
at E:\baJoinApp\bajiaoren\node_modules\@tarojs\service\dist\Kernel.js:8:71
at new Promise ()
at __awaiter (E:\baJoinApp\bajiaoren\node_modules\@tarojs\service\dist\Kernel.js:4:12)
at Kernel.run (E:\baJoinApp\bajiaoren\node_modules\@tarojs\service\dist\Kernel.js:290:16)
Node.js v18.16.0
环境信息