taro
taro copied to clipboard
ubuntu20.04下taro init 报错
相关平台
H5
浏览器版本: NodeJS 20 使用框架: React
复现步骤
报错信息如下: 👽 Taro v3.6.22
⚠ 获取 taro 全局配置文件失败,不存在全局配置文件:/root/.taro-global-config/index.json node:internal/modules/cjs/loader:1327 return process.dlopen(module, path.toNamespacedPath(filename)); ^
Error: /usr/local/share/.config/yarn/global/node_modules/@tarojs/binding-linux-x64-gnu/taro.linux-x64-gnu.node: undefined symbol: __libc_single_threaded
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1327:18)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Function.Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object.
Node.js v20.9.0
期望结果
Taro init 正常
实际结果
Taro init 出错
环境信息
Taro v3.6.22
Taro CLI 3.6.22 environment info:
ubuntu 20.04
node 20.9.0
Taro: v3.6.23 Node: v18.16.0 操作系统:WLS Ubuntu 20.04.6 LTS 报同样的错误,
获取 taro 全局配置文件失败,不存在全局配置文件:/home/xxx/.taro-global-config/index.json
node:internal/modules/cjs/loader:1338
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: /usr/local/lib/node_modules/@tarojs/cli/node_modules/@tarojs/binding-linux-x64-gnu/taro.linux-x64-gnu.node: undefined symbol: __libc_single_threaded
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1338:18)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Function.Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object.<anonymous> (/usr/local/lib/node_modules/@tarojs/cli/node_modules/@tarojs/binding/binding.js:188:31)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Object.newLoader [as .js] (/usr/local/lib/node_modules/@tarojs/cli/node_modules/pirates/lib/index.js:121:7)
at Module.load (node:internal/modules/cjs/loader:1117:32) {
code: 'ERR_DLOPEN_FAILED'
}
Node.js v18.16.0
@vdfor 你这个问题应该升级到 3.6.23 就修复了
我也一样 升级到3.6.23不行
@luckyadam
@vdfor 你这个问题应该升级到 3.6.23 就修复了
不行, taro init 还是报错**
root@iZj6c:~/demo# taro init demo3 👽 Taro v3.6.23
⚠ 获取 taro 全局配置文件失败,不存在全局配置文件:/root/.taro-global-config/index.json node:internal/modules/cjs/loader:1327 return process.dlopen(module, path.toNamespacedPath(filename)); ^
Error: /usr/local/share/.config/yarn/global/node_modules/@tarojs/binding-linux-x64-gnu/taro.linux-x64-gnu.node: undefined symbol: __libc_single_threaded
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1327:18)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Function.Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object.
Node.js v20.9.0
一样的错误,请问有进展吗?或者是否有规避方法? @Chen-jj @luckyadam
实测 3.6.24 已解决