5***@qq.com
5***@qq.com
  • 发布:2022-05-25 14:26
  • 更新:2022-06-01 14:41
  • 阅读:1401

用脚手架创建vue3+uniapp项目运行不起来,在hbuilder中点运行会报一大堆莫名其妙的错误

分类:uni-app

14:25:39.751 failed to load config from /Users/chenchaojie/Desktop/git-yingding/my-vue3-project/vite.config.js
14:25:39.759 error during build:
14:25:39.760 Error:
14:25:39.762 You installed esbuild on another platform than the one you're currently using.
14:25:39.765 This won't work because esbuild is written with native code and needs to
14:25:39.767 install a platform-specific binary executable.
14:25:39.769 Specifically the "esbuild-darwin-arm64" package is present but this platform
14:25:39.771 needs the "esbuild-darwin-64" package instead. People often get into this
14:25:39.771 situation by installing esbuild on Windows or macOS and copying "node_modules"
14:25:39.773 into a Docker image that runs Linux, or by copying "node_modules" between
14:25:39.775 Windows and WSL environments.
14:25:39.778 If you are installing with npm, you can try not copying the "node_modules"
14:25:39.778 directory when you copy the files over, and running "npm ci" or "npm install"
14:25:39.782 on the destination platform after the copy. Or you could consider using yarn
14:25:39.786 instead which has built-in support for installing a package on multiple
14:25:39.788 platforms simultaneously.
14:25:39.788 If you are installing with yarn, you can try listing both this platform and the
14:25:39.791 other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
14:25:39.795 feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
14:25:39.800 Keep in mind that this means multiple copies of esbuild will be present.
14:25:39.800 Another alternative is to use the "esbuild-wasm" package instead, which works
14:25:39.802 the same way on all platforms. But it comes with a heavy performance cost and
14:25:39.805 can sometimes be 10x slower than the "esbuild" package, so you may also not
14:25:39.811 want to do that.
14:25:39.814 at generateBinPath (/Users/chenchaojie/Desktop/git-yingding/my-vue3-project/node_modules/esbuild/lib/main.js:1788:17)
14:25:39.818 at esbuildCommandAndArgs (/Users/chenchaojie/Desktop/git-yingding/my-vue3-project/node_modules/esbuild/lib/main.js:1872:31)
14:25:39.818 at ensureServiceIsRunning (/Users/chenchaojie/Desktop/git-yingding/my-vue3-project/node_modules/esbuild/lib/main.js:2034:25)
14:25:39.823 at Object.build (/Users/chenchaojie/Desktop/git-yingding/my-vue3-project/node_modules/esbuild/lib/main.js:1927:26)
14:25:39.828 at bundleConfigFile (/Users/chenchaojie/Desktop/git-yingding/my-vue3-project/node_modules/vite/dist/node/chunks/dep-59dc6e00.js:61872:34)
14:25:39.832 at loadConfigFromFile (/Users/chenchaojie/Desktop/git-yingding/my-vue3-project/node_modules/vite/dist/node/chunks/dep-59dc6e00.js:61849:35)
14:25:39.832 at resolveConfig (/Users/chenchaojie/Desktop/git-yingding/my-vue3-project/node_modules/vite/dist/node/chunks/dep-59dc6e00.js:61376:34)
14:25:39.836 at doBuild (/Users/chenchaojie/Desktop/git-yingding/my-vue3-project/node_modules/vite/dist/node/chunks/dep-59dc6e00.js:41256:26)
14:25:39.841 at build (/Users/chenchaojie/Desktop/git-yingding/my-vue3-project/node_modules/vite/dist/node/chunks/dep-59dc6e00.js:41244:22)
14:25:39.845 at build (/Users/chenchaojie/Desktop/git-yingding/my-vue3-project/node_modules/@dcloudio/vite-plugin-uni/dist/cli/build.js:17:29)

2022-05-25 14:26 负责人:无 分享
已邀请:

最佳回复

项目目录

项目目录

esbuild-darwin-arm64问题参考:
https://ask.dcloud.net.cn/question/145281

这里已经有最终解决方案

5***@qq.com

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

无法运行到微信小程序中,而且用命令行偶尔会出现sitemap.json文件不存在

该问题目前已经被锁定, 无法添加新回复