【HarmonyOS】Check whether undefined attributes or methods are used in the hvigorconfig.ts a

2025-06-30 23:14:01
104次阅读
0个评论

【HarmonyOS NEXT】Check whether undefined attributes or methods are used in the hvigorconfig.ts and hvigorfile.ts files.

##鸿蒙开发能力 ##HarmonyOS SDK应用服务##鸿蒙金融类应用 (金融理财#

HarmonyOS NEXT

一、问题背景:

在这里插入图片描述 在这里插入图片描述

  • Try the following:

Check whether undefined attributes or methods are used in the hvigorconfig.ts and hvigorfile.ts files. Go to the official website for help More info: https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-hvigor-faqs-V5#section119742124315

hvigor ERROR: BUILD FAILED in 2 s 107 ms

Process finished with exit code -1


*尝试以下操作:

检查hvigorconfig.ts和hvigorfile.ts文件中是否使用了未定义的属性或方法。 前往官方网站寻求帮助 更多信息:https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-hvigor-faqs-V5#section119742124315 hvigor错误:在2秒107毫秒内构建失败 进程已完成,退出代码为-1

二、解决方案:

1.碰到该问题,先根据https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-hvigor-faqs-V5#section119742124315 网址提示,检查hvigorconfig.ts文件和hvigorfile.ts文件里的代码 在这里插入图片描述 2.如果第一步没有问题,那就和我碰到的一致。因为IDE目前有些写法虽然有问题,但是也没报错,就会导致这种奇怪的编译问题。

我是因为import写法不合法,之前是想测试一下写法,忘记删除了。但是IDE也没提示报错,就忘记删除了。。仅供参考,其实可以根据报错语句最上面的编译执行命令,最后提示的地方,寻找线索。

在这里插入图片描述

收藏00

登录 后评论。没有帐号? 注册 一个。