b***@163.com
b***@163.com
  • 发布:2024-11-27 21:22
  • 更新:2024-11-27 22:20
  • 阅读:13

【报Bug】BuilderX无法编译

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win10

HBuilderX类型: Alpha

HBuilderX版本号: 4.36

手机系统: Android

手机系统版本号: Android 15

手机厂商: 华为

手机机型: nova10

页面类型: vue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:

必现

预期结果:

正常编译

实际结果:

编译失败

bug描述:

真机调试,编译时报错
node:internal/modules/cjs/loader:1143
21:20:09.923 throw err;
21:20:09.923 ^
21:20:09.923 Error: Cannot find module 'xregexp'
21:20:09.923 Require stack:
21:20:09.923 - C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\lib\preprocess\lib\preprocess.js
21:20:09.923 - C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\preprocess\index.js
21:20:09.923 - C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\json\json.js
21:20:09.923 - C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\vite\plugins\vitejs\plugins\static.js
21:20:09.923 - C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\vite\plugins\vitejs\plugins\asset.js
21:20:09.923 - C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\vite\utils\plugin.js
21:20:09.923 - C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\vite\utils\index.js
21:20:09.923 - C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\vite\plugins\console.js
21:20:09.923 - C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\hbx\index.js
21:20:09.923 - C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\utils.js
21:20:09.923 - C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\mp\ast.js
21:20:09.923 - C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\mp\index.js
21:20:09.923 - C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\index.js
21:20:09.923 - C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\vite-plugin-uni\dist\cli\index.js
21:20:09.923 - C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\vite-plugin-uni\bin\uni.js
21:20:09.923 at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
21:20:09.923 at Module._load (node:internal/modules/cjs/loader:981:27)
21:20:09.923 at Module.require (node:internal/modules/cjs/loader:1231:19)
21:20:09.923 at require (node:internal/modules/helpers:177:18)
21:20:09.923 at Object.<anonymous> (C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\lib\preprocess\lib\preprocess.js:20:15)
21:20:09.923 at Module._compile (node:internal/modules/cjs/loader:1364:14)
21:20:09.923 at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
21:20:09.923 at Module.load (node:internal/modules/cjs/loader:1203:32)
21:20:09.923 at Module._load (node:internal/modules/cjs/loader:1019:12)
21:20:09.923 at Module.require (node:internal/modules/cjs/loader:1231:19) {
21:20:09.923 code: 'MODULE_NOT_FOUND',
21:20:09.923 requireStack: [
21:20:09.923 'C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\lib\preprocess\lib\preprocess.js',
21:20:09.923 'C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\preprocess\index.js',
21:20:09.923 'C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\json\json.js',
21:20:09.923 'C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\vite\plugins\vitejs\plugins\static.js',
21:20:09.923 'C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\vite\plugins\vitejs\plugins\asset.js',
21:20:09.923 'C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\vite\utils\plugin.js',
21:20:09.923 'C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\vite\utils\index.js',
21:20:09.923 'C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\vite\plugins\console.js',
21:20:09.923 'C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\hbx\index.js',
21:20:09.923 'C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\utils.js',
21:20:09.923 'C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\mp\ast.js',
21:20:09.923 'C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\mp\index.js',
21:20:09.939 'C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\index.js',
21:20:09.939 'C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\vite-plugin-uni\dist\cli\index.js',
21:20:09.939 'C:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\vite-plugin-uni\bin\uni.js'
21:20:09.939 ]
21:20:09.939 }
21:20:09.939 Node.js v18.20.0

2024-11-27 21:22 负责人:无 分享
已邀请:
BoredApe

BoredApe - 有问题就会有答案。

删除uni-app(vue2、vue3)编译插件。重新安装试试

要回复问题请先登录注册