dcloudio / uni-preset-vue

uni-app preset for vue
Apache License 2.0
278 stars 110 forks source link

启动时自动安装真机测试 #51

Closed gswy closed 2 years ago

gswy commented 2 years ago

RT,注意到用cli模式运行APP,仅仅只是在dev目录下进行打包了源代码,并没有启动真机或者模拟器APP,求cli的解决方案。 其次HBuilder中打开项目,提示错误:

17:34:39.981 failed to load config from /Users/wanyun/easement/mini/vite.config.js
17:34:39.984 error during build:
17:34:39.986 Error: 
17:34:39.986 You installed esbuild on another platform than the one you're currently using.
17:34:39.988 This won't work because esbuild is written with native code and needs to
17:34:39.990 install a platform-specific binary executable.
17:34:39.992 Specifically the "esbuild-darwin-arm64" package is present but this platform
17:34:39.992 needs the "esbuild-darwin-64" package instead. People often get into this
17:34:39.994 situation by installing esbuild on Windows or macOS and copying "node_modules"
17:34:39.996 into a Docker image that runs Linux, or by copying "node_modules" between
17:34:39.997 Windows and WSL environments.
17:34:39.998 If you are installing with npm, you can try not copying the "node_modules"
17:34:40.000 directory when you copy the files over, and running "npm ci" or "npm install"
17:34:40.001 on the destination platform after the copy. Or you could consider using yarn
17:34:40.003 instead which has built-in support for installing a package on multiple
17:34:40.003 platforms simultaneously.
17:34:40.005 If you are installing with yarn, you can try listing both this platform and the
17:34:40.007 other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
17:34:40.008 feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
17:34:40.009 Keep in mind that this means multiple copies of esbuild will be present.
17:34:40.010 Another alternative is to use the "esbuild-wasm" package instead, which works
17:34:40.012 the same way on all platforms. But it comes with a heavy performance cost and
17:34:40.012 can sometimes be 10x slower than the "esbuild" package, so you may also not

然而我运行 npm i esbuild-darwin-arm64,HBuilder也是不行的。