h***@163.com
h***@163.com
  • 发布:2023-10-27 10:15
  • 更新:2023-10-27 10:28
  • 阅读:314

【报Bug】昨天运行到浏览器都没有问题,今天运行不了

分类:uni-app

产品分类: uniapp/H5

PC开发环境操作系统: Windows

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

HBuilderX类型: 正式

HBuilderX版本号: 3.7.9

浏览器平台: Chrome

浏览器版本: 118.0.5993.89

项目创建方式: HBuilderX

示例代码:

10:07:41.513 error when starting dev server:
10:07:41.522 Error:
10:07:41.530 You installed esbuild for another platform than the one you're currently using.
10:07:41.537 This won't work because esbuild is written with native code and needs to
10:07:41.546 install a platform-specific binary executable.
10:07:41.554 Specifically the "@esbuild/win32-ia32" package is present but this platform
10:07:41.562 needs the "@esbuild/win32-ia32" package instead. People often get into this
10:07:41.570 situation by installing esbuild on Windows or macOS and copying "node_modules"
10:07:41.570 into a Docker image that runs Linux, or by copying "node_modules" between
10:07:41.578 Windows and WSL environments.
10:07:41.586 If you are installing with npm, you can try not copying the "node_modules"
10:07:41.595 directory when you copy the files over, and running "npm ci" or "npm install"
10:07:41.595 on the destination platform after the copy. Or you could consider using yarn
10:07:41.603 instead of npm which has built-in support for installing a package on multiple
10:07:41.603 platforms simultaneously.
10:07:41.612 If you are installing with yarn, you can try listing both this platform and the
10:07:41.621 other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
10:07:41.621 feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
10:07:41.628 Keep in mind that this means multiple copies of esbuild will be present.
10:07:41.629 Another alternative is to use the "esbuild-wasm" package instead, which works
10:07:41.636 the same way on all platforms. But it comes with a heavy performance cost and
10:07:41.636 can sometimes be 10x slower than the "esbuild" package, so you may also not
10:07:41.645 want to do that.
10:07:41.646 at generateBinPath (F:\HBuilderX\plugins\uniapp-cli-vite\node_modules\esbuild\lib\main.js:1841:17)
10:07:41.653 at esbuildCommandAndArgs (F:\HBuilderX\plugins\uniapp-cli-vite\node_modules\esbuild\lib\main.js:1922:33)
10:07:41.654 at ensureServiceIsRunning (F:\HBuilderX\plugins\uniapp-cli-vite\node_modules\esbuild\lib\main.js:2087:25)
10:07:41.662 at build (F:\HBuilderX\plugins\uniapp-cli-vite\node_modules\esbuild\lib\main.js:1978:26)
10:07:41.670 at bundleConfigFile (file:///F:/HBuilderX/plugins/uniapp-cli-vite/node_modules/vite/dist/node/chunks/dep-ca21228b.js:62245:26)
10:07:41.679 at loadConfigFromFile (file:///F:/HBuilderX/plugins/uniapp-cli-vite/node_modules/vite/dist/node/chunks/dep-ca21228b.js:62221:31)
10:07:41.687 at resolveConfig (file:///F:/HBuilderX/plugins/uniapp-cli-vite/node_modules/vite/dist/node/chunks/dep-ca21228b.js:61843:34)
10:07:41.695 at Module.createServer (file:///F:/HBuilderX/plugins/uniapp-cli-vite/node_modules/vite/dist/node/chunks/dep-ca21228b.js:61153:26)
10:07:41.703 at F:\HBuilderX\plugins\uniapp-cli-vite\node_modules\vite\index.cjs:23:55
10:07:41.712 at async createServer (F:\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\vite-plugin-uni\dist\cli\server.js:44:20)

操作步骤:

1

预期结果:

1

实际结果:

1

bug描述:

1

2023-10-27 10:15 负责人:无 分享
已邀请:
喜欢技术的前端

喜欢技术的前端 - QQ---445849201

要回复问题请先登录注册