1、创建新的HX工程
2、将存量的cli工程挪进新建的HX工程中,转化微信小程序并运行
3、转化鸿蒙元服务并运行

- 发布:2024-12-16 10:40
- 更新:2024-12-26 16:12
- 阅读:210
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win11 22631.3155
HBuilderX类型: Alpha
HBuilderX版本号: 4.41
手机系统: HarmonyOS NEXT
手机系统版本号: HarmonyOS NEXT Developer Beta2
手机厂商: 华为
手机机型: Mate 60Pro
页面类型: vue
vue版本: vue3
打包方式: 离线
项目创建方式: HBuilderX
操作步骤:
预期结果:
1、创建新的HX工程
2、将存量的cli工程挪进新建的HX工程中,转化微信小程序并运行正常
3、转化鸿蒙元服务时报错:
node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js (8:0): "getEscapedCssVarName" is not exported by "node_modules/@vue/shared/dist/shared.esm-bundler.js", imported by "node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js".
1、创建新的HX工程
2、将存量的cli工程挪进新建的HX工程中,转化微信小程序并运行正常
3、转化鸿蒙元服务时报错:
node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js (8:0): "getEscapedCssVarName" is not exported by "node_modules/@vue/shared/dist/shared.esm-bundler.js", imported by "node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js".
实际结果:
1、创建新的HX工程
2、将存量的cli工程挪进新建的HX工程中,转化微信小程序运行没问题
3、转化鸿蒙元服务会报错:
node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js (8:0): "getEscapedCssVarName" is not exported by "node_modules/@vue/shared/dist/shared.esm-bundler.js", imported by "node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js".
1、创建新的HX工程
2、将存量的cli工程挪进新建的HX工程中,转化微信小程序运行没问题
3、转化鸿蒙元服务会报错:
node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js (8:0): "getEscapedCssVarName" is not exported by "node_modules/@vue/shared/dist/shared.esm-bundler.js", imported by "node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js".
bug描述:
正常的HX工程转化鸿蒙元服务会报错
10:33:50.953 node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js (8:0): "getEscapedCssVarName" is not exported by "node_modules/@vue/shared/dist/shared.esm-bundler.js", imported by "node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js".
10:33:50.953 file: D:/projects/HarmonyOS/HBuilderProjects/diorTestASCF/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:8:0
10:33:50.953 6: import { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, shal...
10:33:50.953 7: export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, ...
10:33:50.953 8: import { isString, isFunction, isPromise, isArray, EMPTY_OBJ, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn...
10:33:50.953 ^
10:33:50.953 9: export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '...
10:33:50.953 at ../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:8:0
10:33:50.953 6: import { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, shal...
10:33:50.953 7: export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, ...
10:33:50.954 8: import { isString, isFunction, isPromise, isArray, EMPTY_OBJ, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn...
10:33:50.954 ^
10:33:50.954 9: export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '...
3 个回复
DCloud_UNI_OttoJi - 日常回复 uni-app/x 问题,如果艾特我没看到,请主动私信
感谢反馈,元服务目前还有一些组件和 api 还未开放适配,可能会导致白屏。你可以尝试精简页面,逐个页面进行适配。从而缩小问题范围。如果还有问题可以基础空白项目提供复现工程,我协助查看
w***@163.com
同问,相同问题,pnpm dev:mp-weixin 报错
w***@163.com
npx @dcloudio/uvm@latest 会更新 vue 到 3.5.12, 导致与@dcloudio/uni-app 依赖版本 3.4.21 不一致,手动降低 vue 版本到3.4.21
2024-12-26 16:15
DCloud_UNI_OttoJi
回复 w***@163.com: 我试了试没有主动升级 vue版本,奇怪
2024-12-31 16:39
w***@163.com
@vue/shared 版本问题,3.4.21 没有导出方法 getEscapedCssVarName