ohpm在ubuntu上安装后,提示ERROR: ohpm has not been initialized yet. Execute the init script to initialize it first

18025342273 显示全部楼层 发表于 2024-1-31 11:36:06

参照https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/ide-command-line-ohpm-0000001490235312-V3链接操作,下载linux版本ohpm,然后解压进入oh-command-line-tools/ohpm/bin目录./init运行结果如下 image.png

是不是ubuntu不能安装ohpm

您尚未登录,无法参与评论,登录后可以:
参与开源共建问题交流
认同或收藏高质量问答
获取积分成为开源共建先驱

精彩评论3

马迪

沙发 发表于 2024-2-1 11:59:36
在 ~/Document/oh-command-line-tools/ohpm/bin/ 下执行 node pm-cli.js 查看详细报错信息

18025342273

发表于 2024-2-1 16:37  IP属地: - 中国广东省广州市 中国电信IDC

回复 马迪:

  1. /home/hgt/Documents/oh-command-line-tools/ohpm/node_modules/readable-stream/lib/ours/util.js:5
  2. const Blob = globalThis.Blob || bufferModule.Blob
  3.              ^

  4. ReferenceError: globalThis is not defined
  5.     at Object.<anonymous> (/home/hgt/Documents/oh-command-line-tools/ohpm/node_modules/readable-stream/lib/ours/util.js:5:14)
  6.     at Module._compile (internal/modules/cjs/loader.js:778:30)
  7.     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
  8.     at Module.load (internal/modules/cjs/loader.js:653:32)
  9.     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
  10.     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
  11.     at Module.require (internal/modules/cjs/loader.js:692:17)
  12.     at require (internal/modules/cjs/helpers.js:25:18)
  13.     at Object.<anonymous> (/home/hgt/Documents/oh-command-line-tools/ohpm/node_modules/readable-stream/lib/stream.js:31:5)
  14.     at Module._compile (internal/modules/cjs/loader.js:778:30)
复制代码

【1 条回复】

马迪

板凳 发表于 2024-2-4 09:21:40
更新一下nodejs版本到node18及以上

Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

返回顶部