升级到uniappx 4.27最新版本(cli项目) 云打包为安卓app编译报错 应该是vite rollup的报错 不支持require?
如下图issue!!!
https://github.com/uni-helper/uni-network/issues/52
!!!
@dcloudio/vite-plugin-uni回滚为3.0.0-4020420240722002可以正常打包
[HBuilder] 17:16:54.404 node_modules/statuses/index.js (8:7): Error when using sourcemap for reporting an error: Can't resolve original location of error.
[HBuilder] 17:16:54.414 x Build failed in 2.54s
[HBuilder] 17:16:54.423 node_modules/statuses/index.js (8:7): "default" is not exported by "
[HBuilder] 17:16:54.435 file: E:/app/newApp/node_modules/statuses/index.js:8:7
[HBuilder] 17:16:54.444 6: /
[HBuilder] 17:16:54.453 7: import as commonjsHelpers from "
[HBuilder] 17:16:54.461 8: import require$$0 from "\u0000E:/app/newApp/node_modules/statuses/codes.json?common...
[HBuilder] 17:16:54.470 ^
[HBuilder] 17:16:54.479 9:
[HBuilder] 17:16:54.487 10: 'use strict'
[HBuilder] 17:16:54.491 at getRollupError (file:///E:/%E6%A0%B8%E5%BF%83/%E6%B5%99%E6%B1%9F%E7%BB%BC%E5%90%88%E4%BA%A4%E9%80%9A%E5%A4%A7%E6%95%B0%E6%8D%AE%E4%B8%AD%E5%BF%83/%E5%BC%80%E5%8F%91%E4%BB%A3%E7%A0%81/%E4%BA%A4%E7%A7%91%E7%A7%91%E6%8A%80/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9app/newApp/node_modules/.pnpm/rollup@4.21.1/node_modules/rollup/dist/es/shared/parseAst.js:392:41)
[HBuilder] 17:16:54.500 at error (file:///E:/%E6%A0%B8%E5%BF%83/%E6%B5%99%E6%B1%9F%E7%BB%BC%E5%90%88%E4%BA%A4%E9%80%9A%E5%A4%A7%E6%95%B0%E6%8D%AE%E4%B8%AD%E5%BF%83/%E5%BC%80%E5%8F%91%E4%BB%A3%E7%A0%81/%E4%BA%A4%E7%A7%91%E7%A7%91%E6%8A%80/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9app/newApp/node_modules/.pnpm/rollup@4.21.1/node_modules/rollup/dist/es/shared/parseAst.js:388:42)
[HBuilder] 17:16:54.509 at Module.error (file:///E:/%E6%A0%B8%E5%BF%83/%E6%B5%99%E6%B1%9F%E7%BB%BC%E5%90%88%E4%BA%A4%E9%80%9A%E5%A4%A7%E6%95%B0%E6%8D%AE%E4%B8%AD%E5%BF%83/%E5%BC%80%E5%8F%91%E4%BB%A3%E7%A0%81/%E4%BA%A4%E7%A7%91%E7%A7%91%E6%8A%80/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9app/newApp/node_modules/.pnpm/rollup@4.21.1/node_modules/rollup/dist/es/shared/node-entry.js:13967:16)
[HBuilder] 17:16:54.519 at Module.traceVariable (file:///E:/%E6%A0%B8%E5%BF%83/%E6%B5%99%E6%B1%9F%E7%BB%BC%E5%90%88%E4%BA%A4%E9%80%9A%E5%A4%A7%E6%95%B0%E6%8D%AE%E4%B8%AD%E5%BF%83/%E5%BC%80%E5%8F%91%E4%BB%A3%E7%A0%81/%E4%BA%A4%E7%A7%91%E7%A7%91%E6%8A%80/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9app/newApp/node_modules/.pnpm/rollup@4.21.1/node_modules/rollup/dist/es/shared/node-entry.js:14414:29)
[HBuilder] 17:16:54.530 at ModuleScope.findVariable (file:///E:/%E6%A0%B8%E5%BF%83/%E6%B5%99%E6%B1%9F%E7%BB%BC%E5%90%88%E4%BA%A4%E9%80%9A%E5%A4%A7%E6%95%B0%E6%8D%AE%E4%B8%AD%E5%BF%83/%E5%BC%80%E5%8F%91%E4%BB%A3%E7%A0%81/%E4%BA%A4%E7%A7%91%E7%A7%91%E6%8A%80/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9app/newApp/node_modules/.pnpm/rollup@4.21.1/node_modules/rollup/dist/es/shared/node-entry.js:12121:39)
[HBuilder] 17:16:54.540 at Identifier.bind (file:///E:/%E6%A0%B8%E5%BF%83/%E6%B5%99%E6%B1%9F%E7%BB%BC%E5%90%88%E4%BA%A4%E9%80%9A%E5%A4%A7%E6%95%B0%E6%8D%AE%E4%B8%AD%E5%BF%83/%E5%BC%80%E5%8F%91%E4%BB%A3%E7%A0%81/%E4%BA%A4%E7%A7%91%E7%A7%91%E6%8A%80/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9app/newApp/node_modules/.pnpm/rollup@4.21.1/node_modules/rollup/dist/es/shared/node-entry.js:6941:40)
[HBuilder] 17:16:54.552 at VariableDeclarator.bind (file:///E:/%E6%A0%B8%E5%BF%83/%E6%B5%99%E6%B1%9F%E7%BB%BC%E5%90%88%E4%BA%A4%E9%80%9A%E5%A4%A7%E6%95%B0%E6%8D%AE%E4%B8%AD%E5%BF%83/%E5%BC%80%E5%8F%91%E4%BB%A3%E7%A0%81/%E4%BA%A4%E7%A7%91%E7%A7%91%E6%8A%80/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9app/newApp/node_modules/.pnpm/rollup@4.21.1/node_modules/rollup/dist/es/shared/node-entry.js:4808:23)
[HBuilder] 17:16:54.567 at VariableDeclaration.bind (file:///E:/%E6%A0%B8%E5%BF%83/%E6%B5%99%E6%B1%9F%E7%BB%BC%E5%90%88%E4%BA%A4%E9%80%9A%E5%A4%A7%E6%95%B0%E6%8D%AE%E4%B8%AD%E5%BF%83/%E5%BC%80%E5%8F%91%E4%BB%A3%E7%A0%81/%E4%BA%A4%E7%A7%91%E7%A7%91%E6%8A%80/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9app/newApp/node_modules/.pnpm/rollup@4.21.1/node_modules/rollup/dist/es/shared/node-entry.js:4804:28)
[HBuilder] 17:16:54.579 at Program.bind (file:///E:/%E6%A0%B8%E5%BF%83/%E6%B5%99%E6%B1%9F%E7%BB%BC%E5%90%88%E4%BA%A4%E9%80%9A%E5%A4%A7%E6%95%B0%E6%8D%AE%E4%B8%AD%E5%BF%83/%E5%BC%80%E5%8F%91%E4%BB%A3%E7%A0%81/%E4%BA%A4%E7%A7%91%E7%A7%91%E6%8A%80/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9app/newApp/node_modules/.pnpm/rollup@4.21.1/node_modules/rollup/dist/es/shared/node-entry.js:4804:28)
[HBuilder] 17:16:54.593 at Module.bindReferences (file:///E:/%E6%A0%B8%E5%BF%83/%E6%B5%99%E6%B1%9F%E7%BB%BC%E5%90%88%E4%BA%A4%E9%80%9A%E5%A4%A7%E6%95%B0%E6%8D%AE%E4%B8%AD%E5%BF%83/%E5%BC%80%E5%8F%91%E4%BB%A3%E7%A0%81/%E4%BA%A4%E7%A7%91%E7%A7%91%E6%8A%80/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9/%E6%B8%A9%E5%B7%9E%E9%A9%BE%E5%9F%B9app/newApp/node_modules/.pnpm/rollup@4.21.1/node_modules/rollup/dist/es/shared/node-entry.js:13946:18) {
[HBuilder] 17:16:54.607 binding: 'default',
[HBuilder] 17:16:54.624 code: 'MISSING_EXPORT',
[HBuilder] 17:16:54.637 exporter: '\x00E:/核心/浙江综合交通大数据中心/开发代码/交科科技/温州驾培/温州驾培app/newApp/node_modules/statuses/codes.json?commonjs-proxy',
[HBuilder] 17:16:54.649 id: 'E:/核心/浙江综合交通大数据中心/开发代码/交科科技/温州驾培/温州驾培app/newApp/node_modules/statuses/index.js',
[HBuilder] 17:16:54.663 url: 'https://rollupjs.org/troubleshooting/#error-name-is-not-exported-by-module',
[HBuilder] 17:16:54.667 pos: 181,
[HBuilder] 17:16:54.679 loc: {
[HBuilder] 17:16:54.693 column: 7,
[HBuilder] 17:16:54.696 file: 'app/newApp/node_modules/statuses/index.js',
[HBuilder] 17:16:54.709 line: 8
[HBuilder] 17:16:54.721 },
[HBuilder] 17:16:54.733 frame: ' 6: /\n' +
[HBuilder] 17:16:54.744 ' 7: import as commonjsHelpers from "\x00commonjsHelpers.js";\n' +
[HBuilder] 17:16:54.756 ' 8: import require$$0 from "\u0000E:/app/newApp/node_modules/statuses/codes.json?common...\n' +
[HBuilder] 17:16:54.768 ' ^\n' +
[HBuilder] 17:16:54.778 ' 9: \n' +
[HBuilder] 17:16:54.790 "10: 'use strict'",