taro icon indicating copy to clipboard operation
taro copied to clipboard

ubuntu20.04下taro init 报错

Open vdfor opened this issue 1 year ago • 5 comments

相关平台

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. (/usr/local/share/.config/yarn/global/node_modules/@tarojs/binding/binding.js:188:31) at Module._compile (node:internal/modules/cjs/loader:1241:14) at Module._extensions..js (node:internal/modules/cjs/loader:1295:10) at Object.newLoader [as .js] (/usr/local/share/.config/yarn/global/node_modules/pirates/lib/index.js:121:7) at Module.load (node:internal/modules/cjs/loader:1091:32) { code: 'ERR_DLOPEN_FAILED' }

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

vdfor avatar Jan 03 '24 03:01 vdfor

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

jamessawyer avatar Jan 31 '24 07:01 jamessawyer

@vdfor 你这个问题应该升级到 3.6.23 就修复了

luckyadam avatar Jan 31 '24 09:01 luckyadam

img_v3_027l_1b546e51-14b0-4fdb-b8a3-a0fe8c21debg 我也一样 升级到3.6.23不行

weikangqq avatar Feb 01 '24 07:02 weikangqq

@luckyadam image

weikangqq avatar Feb 01 '24 07:02 weikangqq

@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. (/usr/local/share/.config/yarn/global/node_modules/@tarojs/binding/binding.js:188:31) at Module._compile (node:internal/modules/cjs/loader:1241:14) at Module._extensions..js (node:internal/modules/cjs/loader:1295:10) at Object.newLoader [as .js] (/usr/local/share/.config/yarn/global/node_modules/pirates/lib/index.js:121:7) at Module.load (node:internal/modules/cjs/loader:1091:32) { code: 'ERR_DLOPEN_FAILED' }

Node.js v20.9.0

vdfor avatar Feb 02 '24 06:02 vdfor

一样的错误,请问有进展吗?或者是否有规避方法? @Chen-jj @luckyadam

dayeguilaiye avatar Feb 27 '24 11:02 dayeguilaiye

实测 3.6.24 已解决

vdfor avatar Mar 03 '24 11:03 vdfor

一样的错误,请问有进展吗?或者是否有规避方法? @Chen-jj @luckyadam

run npx @tarojs/[email protected] init myxxx

zangguojun avatar Apr 19 '24 13:04 zangguojun