讨论广场 问答详情
OpenHarmony4.1 Release RK3568编译失败
weixin_53617138 2024-07-10 20:56:55
245 评论 分享

使用镜像站点下载的全量代码包进行编译构建

hb安装以及预编译都没有问题,但是在编译过程中报错

[26602/73294] ACTION //third_party/typescript:build_typescript(//build/toolchain/ohos:ohos_clang_arm)
FAILED: obj/third_party/typescript/build_typescript.stamp 
/usr/bin/env ../../third_party/typescript/compile_typescript.py /home/ridx/oscomp/OpenHarmony-v4.1-Release/OpenHarmony/third_party/typescript/
Traceback (most recent call last):
  File "../../third_party/typescript/compile_typescript.py", line 43, in <module>
    main(sys.argv[1:])
  File "../../third_party/typescript/compile_typescript.py", line 39, in main
    run_pack(source_path)
  File "../../third_party/typescript/compile_typescript.py", line 34, in run_pack
    run_cmd(["npm", "pack"], execution_path)
  File "../../third_party/typescript/compile_typescript.py", line 23, in run_cmd
    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
  File "/home/ridx/miniconda3/envs/oh/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/ridx/miniconda3/envs/oh/lib/python3.8/subprocess.py", line 1720, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'npm'

在gitee中找到了类似的错误,但是无人解答https://gitee.com/openharmony/docs/issues/I9GGW5

希望能得到解决,编译最新的通过repo得到的代码有同样的错误,都是在构建typescript时出现。

245 评论 分享
写回答
全部评论(3)
1 楼

错误提示:FileNotFoundError: [Errno 2] No such file or directory: 'npm',请尝试安装nodejs

本机输入:

 

 

2024-07-10 21:39:13
2024-09-19 18:17:01
引用:“多谢,已经解决”
你好,是按照上面的方式解决的吗?我也遇到了同样的问题 https://forums.openharmony.cn/forum.php?mod=viewthread&tid=3497
2024-09-19 18:17:01
2024-07-10 22:44:08
多谢,已经解决
2024-07-10 22:44:08