uni-app UST harmony next 试用付费插件编译不通过 is not a module
uni-app UST harmony next 试用付费插件编译不通过 is not a module
引用插件的代码怎么写的?用了哪几个插件?插件包里面有app-harmony相关的目录、代码吗
更多关于uni-app UST harmony next 试用付费插件编译不通过 is not a module的实战教程也可以访问 https://www.itying.com/category-93-b0.html
1.引用插件就是正常的 import ,我自己写了一个UTS 插件本地引用编译到是Harmony没问题的,说明代码没问题。 但是发布到市场,试用就有问题了,看起来像是uts文件加密编译到Harmony 编译不通过
3.具体可以https://ext.dcloud.net.cn/search?q=Harmony 搜索几个插件,编译到Harmony 试一下看看
回复 v***@foxmail.com: 鸿蒙目前不支持加密插件的试用,相关功能还在调研
我发布的UTS插件,用户也反馈了一样的问题
17:29:15.468 [uni:uts-uni_modules] load_transformed failed
17:29:15.468 Caused by:
17:29:15.468 0: Bundler.load() failed
17:29:15.468 1: Bundler.loader.load(/Users/Soushin/HBulderProject/uni-deviceid-simple/unpackage/dist/build/.uvue/app-harmony/uni_modules/CZ-DeviceId/utssdk/app-harmony/index.uts) failed
17:29:15.468 2:
17:29:15.468 x Expression expected
17:29:15.468 ,-[/Users/Soushin/HBulderProject/uni-deviceid-simple/unpackage/dist/build/.uvue/app-harmony/uni_modules/CZ-DeviceId/utssdk/app-harmony/index.uts:9:1]
17:29:15.469 9 | q0lS;
17:29:15.469 10 | C;
17:29:15.469 11 | M: u;
17:29:15.469 12 | & UN稯 > ;
17:29:15.469 : ^
17:29:15.469 13 | tm5;
17:29:15.469 14 | N;
17:29:15.469 15 | 8;
17:29:15.469 `----
17:29:15.469
17:29:15.469 3: Syntax Error
17:29:15.469 file: /Users/Soushin/HBulderProject/uni-deviceid-simple/uni_modules/CZ-DeviceId?uts-proxy
正常用源码版的可以用,普通授权版的会报这个问题
问题分析: 编译报错"is not a module"通常是由于模块引用路径或配置问题导致的。在Harmony Next环境下使用uni-app付费插件时,需要注意以下几点:
- 确保已正确安装插件:
- 通过官方插件市场完成购买和下载
- 检查项目manifest.json中是否已正确配置插件
- 检查模块引用方式: Harmony Next对模块化有严格要求,建议使用完整路径引用:
import plugin from '@/uni_modules/插件ID/js_sdk/xxx.js'