7***@qq.com
7***@qq.com
  • 发布:2025-05-15 12:31
  • 更新:2025-05-15 12:59
  • 阅读:48

升级新版本报这个错

分类:HBuilderX

failed to load config from vite.config.js
12:30:40.938 error during build:
12:30:40.938 TypeError: createUniXKotlinCompilerOnce is not a function
12:30:40.938 at uniUTSAppUniModulesPlugin (/Users/mars/smart-canteen-mapp-ios/node_modules/@dcloudio/uni-app-vite/node_modules/@dcloudio/uni-cli-shared/dist/vite/plugins/uts/uni_modules.js:213:11)
12:30:40.938 at exports.default (/Users/mars/smart-canteen-mapp-ios/node_modules/@dcloudio/uni-app-vite/dist/index.js:13:56)
12:30:40.938 at /Users/mars/smart-canteen-mapp-ios/node_modules/@dcloudio/vite-plugin-uni/dist/utils/plugin.js:81:20
12:30:40.938 at Array.map (<anonymous>)
12:30:40.938 at initPlugins (/Users/mars/smart-canteen-mapp-ios/node_modules/@dcloudio/vite-plugin-uni/dist/utils/plugin.js:79:10)
12:30:40.938 at initExtraPlugins (/Users/mars/smart-canteen-mapp-ios/node_modules/@dcloudio/vite-plugin-uni/dist/utils/plugin.js:60:12)
12:30:40.939 at createPlugins (/Users/mars/smart-canteen-mapp-ios/node_modules/@dcloudio/vite-plugin-uni/dist/index.js:81:53)
12:30:40.939 at uniPlugin (/Users/mars/smart-canteen-mapp-ios/node_modules/@dcloudio/vite-plugin-uni/dist/index.js:48:11)
12:30:40.939 at Object.<anonymous> (/Users/mars/smart-canteen-mapp-ios/vite.config.js:49:40)
12:30:40.939 at Module._compile (node:internal/modules/cjs/loader:1196:14)
12:30:40.947 已停止运行...

2025-05-15 12:31 负责人:无 分享
已邀请:
7***@qq.com

7***@qq.com (作者)

failed to load config from /Users/mars/smart-canteen-mapp-ios/vite.config.js
12:50:21.910 error during build:
12:50:21.910 Error: Cannot find module 'unplugin-vue-components/vite'
12:50:21.910 Require stack:
12:50:21.910 - /Users/mars/smart-canteen-mapp-ios/vite.config.js
12:50:21.910 - /Users/mars/smart-canteen-mapp-ios/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js
12:50:21.910 at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
12:50:21.910 at Module._resolveFilename (/Users/mars/smart-canteen-mapp-ios/node_modules/module-alias/index.js:49:29)
12:50:21.910 at Module._load (node:internal/modules/cjs/loader:981:27)
12:50:21.910 at Module.require (node:internal/modules/cjs/loader:1231:19)
12:50:21.910 at require (node:internal/modules/helpers:177:18)
12:50:21.910 at Object.<anonymous> (/Users/mars/smart-canteen-mapp-ios/vite.config.js:37:28)
12:50:21.910 at Module._compile (node:internal/modules/cjs/loader:1364:14)
12:50:21.910 at _require.extensions.<computed> [as .js] (file:///Users/mars/smart-canteen-mapp-ios/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:68693:24)
12:50:21.910 at Module.load (node:internal/modules/cjs/loader:1203:32)
12:50:21.910 at Module._load (node:internal/modules/cjs/loader:1019:12)
12:50:21.916 已停止运行...
现在报这个错了,node版本18.20 hbuilder 4.65

DCloud_UNI_JBB

DCloud_UNI_JBB

您好,麻烦发个可复现的demo

  • 1***@qq.com

    我也出现这个 TypeError: createUniXKotlinCompilerOnce is not a function 问题,引入 第三方收费UTS插件的时候就报错

    2025-05-18 14:27

要回复问题请先登录注册