1***@qq.com
1***@qq.com
  • 发布:2025-07-30 18:25
  • 更新:2025-07-30 18:26
  • 阅读:54

my-vue3-project 无法运行微信小程序

分类:HBuilderX

[] Error: file: common/assets.js
--- PLACEHOLDER PACKAGE ---
This @babel/plugin-proposal-private-property-in-object version is not meant to
be imported. Something is importing
@babel/plugin-proposal-private-property-in-object without declaring it in its
dependencies (or devDependencies) in the package.json file.
Add "@babel/plugin-proposal-private-property-in-object" to your devDependencies
to work around this error. This will make this message go away.

Error: file: common/assets.js
--- PLACEHOLDER PACKAGE ---
This @babel/plugin-proposal-private-property-in-object version is not meant to
be imported. Something is importing
@babel/plugin-proposal-private-property-in-object without declaring it in its
dependencies (or devDependencies) in the package.json file.
Add "@babel/plugin-proposal-private-property-in-object" to your devDependencies
to work around this error. This will make this message go away.

at enhance (C:\Users\ilas\AppData\Local\微信开发者工具\User Data\97c2c3ed9e9b4a343745d4ac3603eef1\WeappCode\package.nw\js\common\miniprogram-builder\modules\corecompiler\summer\plugins\enhance.js:1:1579)  
at doTransform (C:\Users\ilas\AppData\Local\微信开发者工具\User Data\97c2c3ed9e9b4a343745d4ac3603eef1\WeappCode\package.nw\js\common\miniprogram-builder\modules\corecompiler\summer\plugins\enhance.js:1:1827)  
at Object.runSummerPluginHook (C:\Users\ilas\AppData\Local\微信开发者工具\User Data\97c2c3ed9e9b4a343745d4ac3603eef1\WeappCode\package.nw\js\common\miniprogram-builder\modules\corecompiler\summer\worker.js:2:1239)(env: Windows,mp,1.06.2504010; lib: 3.8.12)  

[] Error: file: common/vendor.js
--- PLACEHOLDER PACKAGE ---
This @babel/plugin-proposal-private-property-in-object version is not meant to
be imported. Something is importing
@babel/plugin-proposal-private-property-in-object without declaring it in its
dependencies (or devDependencies) in the package.json file.
Add "@babel/plugin-proposal-private-property-in-object" to your devDependencies
to work around this error. This will make this message go away.

Error: file: common/vendor.js
--- PLACEHOLDER PACKAGE ---
This @babel/plugin-proposal-private-property-in-object version is not meant to
be imported. Something is importing
@babel/plugin-proposal-private-property-in-object without declaring it in its
dependencies (or devDependencies) in the package.json file.
Add "@babel/plugin-proposal-private-property-in-object" to your devDependencies
to work around this error. This will make this message go away.

at enhance (C:\Users\ilas\AppData\Local\微信开发者工具\User Data\97c2c3ed9e9b4a343745d4ac3603eef1\WeappCode\package.nw\js\common\miniprogram-builder\modules\corecompiler\summer\plugins\enhance.js:1:1579)  
at doTransform (C:\Users\ilas\AppData\Local\微信开发者工具\User Data\97c2c3ed9e9b4a343745d4ac3603eef1\WeappCode\package.nw\js\common\miniprogram-builder\modules\corecompiler\summer\plugins\enhance.js:1:1827)  
at Object.runSummerPluginHook (C:\Users\ilas\AppData\Local\微信开发者工具\User Data\97c2c3ed9e9b4a343745d4ac3603eef1\WeappCode\package.nw\js\common\miniprogram-builder\modules\corecompiler\summer\worker.js:2:1239)(env: Windows,mp,1.06.2504010; lib: 3.8.12)  

[] Error: file: app.js
--- PLACEHOLDER PACKAGE ---
This @babel/plugin-proposal-private-property-in-object version is not meant to
be imported. Something is importing
@babel/plugin-proposal-private-property-in-object without declaring it in its
dependencies (or devDependencies) in the package.json file.
Add "@babel/plugin-proposal-private-property-in-object" to your devDependencies
to work around this error. This will make this message go away.

Error: file: app.js
--- PLACEHOLDER PACKAGE ---
This @babel/plugin-proposal-private-property-in-object version is not meant to
be imported. Something is importing
@babel/plugin-proposal-private-property-in-object without declaring it in its
dependencies (or devDependencies) in the package.json file.
Add "@babel/plugin-proposal-private-property-in-object" to your devDependencies
to work around this error. This will make this message go away

2025-07-30 18:25 负责人:无 分享
已邀请:
DCloud_UNI_yuhe

DCloud_UNI_yuhe

你好,请提供一下可以复现此问题的项目,可以打包发送到评论区中

  • 1***@qq.com (作者)

    直接官方npx degit dcloudio/uni-preset-vue#vite my-vue3-project下载的项目不做任何改动就是这样的

    2025-07-31 15:40

  • 1***@qq.com (作者)

    然后发现把微信小程序本地设置(将js编译成ES5)关闭就可以正常编译了,但不知道具体为什么这样

    2025-07-31 15:43

要回复问题请先登录注册