大志
大志
  • 发布:2024-01-07 15:51
  • 更新:2024-01-07 15:51
  • 阅读:363

根据提示执行过 npx @dcloudio/uvm@latest alpha 之后报错

分类:uni-app

15:38:02.957 编译器版本:3.99(vue3)
15:38:02.961 正在编译中...
15:38:03.076 failed to load config from /Users/jiaoshengzhi/EPSoftGit/SRC/uniapp-A101411/vite.config.ts
15:38:03.079 error when starting dev server:
15:38:03.079 Error:
15:38:03.084 You installed esbuild for another platform than the one you're currently using.
15:38:03.084 This won't work because esbuild is written with native code and needs to
15:38:03.086 install a platform-specific binary executable.
15:38:03.089 Specifically the "@esbuild/darwin-arm64" package is present but this platform
15:38:03.090 needs the "@esbuild/darwin-x64" package instead. People often get into this
15:38:03.093 situation by installing esbuild with npm running inside of Rosetta 2 and then
15:38:03.096 trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta
15:38:03.096 2 is Apple's on-the-fly x86_64-to-arm64 translation service).
15:38:03.099 If you are installing with npm, you can try ensuring that both npm and node are
15:38:03.102 not running under Rosetta 2 and then reinstalling esbuild. This likely involves
15:38:03.102 changing how you installed npm and/or node. For example, installing node with
15:38:03.105 the universal installer here should work: https://nodejs.org/en/download/. Or
15:38:03.105 you could consider using yarn instead of npm which has built-in support for
15:38:03.109 installing a package on multiple platforms simultaneously.
15:38:03.109 If you are installing with yarn, you can try listing both "arm64" and "x64"
15:38:03.113 in your ".yarnrc.yml" file using the "supportedArchitectures" feature:
15:38:03.113 https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
15:38:03.118 Keep in mind that this means multiple copies of esbuild will be present.
15:38:03.118 Another alternative is to use the "esbuild-wasm" package instead, which works
15:38:03.122 the same way on all platforms. But it comes with a heavy performance cost and
15:38:03.122 can sometimes be 10x slower than the "esbuild" package, so you may also not
15:38:03.127 want to do that.

项目是基于vue3+vk-uview-ui,本来一切都好。按照时间线按照命令提示 执行 npx @dcloudio/uvm@latest alpha 出现的问题。
hbuilderX工具下,运行->运行到浏览器之后会发生以上错误。

执行 npm run dev:h5 之后会报以下错误:
Uncaught SyntaxError: The requested module '/webapp/node_modules/.pnpm/vue-demi@0.14.6_vue@3.4.5/node_modules/vue-demi/lib/index.mjs?v=2840acac' does not provide an export named 'hasInjectionContext' (at pinia.mjs:6:10)

执行npm run build:mp-weixin 后 ui组件会不生效

哪位大佬碰到过这种问题,请帮忙解惑。

2024-01-07 15:51 负责人:无 分享
已邀请:

要回复问题请先登录注册