{
"name": "uniapp_vue3_vite_ts",
"version": "1.1.2",
"scripts": {
"dev:app": "uni -p app",
"dev:custom": "uni -p",
"dev:h5": "uni",
"dev:h5:ssr": "uni --ssr",
"dev:mp-alipay": "uni -p mp-alipay",
"dev:mp-baidu": "uni -p mp-baidu",
"dev:mp-kuaishou": "uni -p mp-kuaishou",
"dev:mp-lark": "uni -p mp-lark",
"dev:mp-qq": "uni -p mp-qq",
"dev:mp-toutiao": "uni -p mp-toutiao",
"dev:mp-weixin": "uni -p mp-weixin",
"dev:quickapp-webview": "uni -p quickapp-webview",
"dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei",
"dev:quickapp-webview-union": "uni -p quickapp-webview-union",
"build:app": "uni build -p app",
"build:custom": "uni build -p",
"build:h5": "uni build --minify",
"build:h5:ssr": "uni build --ssr",
"build:mp-alipay": "uni build -p mp-alipay",
"build:mp-baidu": "uni build -p mp-baidu",
"build:mp-kuaishou": "uni build -p mp-kuaishou",
"build:mp-lark": "uni build -p mp-lark",
"build:mp-qq": "uni build -p mp-qq",
"build:mp-toutiao": "uni build -p mp-toutiao",
"build:mp-weixin": "uni build -p mp-weixin --minify",
"build:quickapp-webview": "uni build -p quickapp-webview",
"build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
"build:quickapp-webview-union": "uni build -p quickapp-webview-union",
"lint": "pnpm lint:format & pnpm lint:eslint",
"lint:eslint": "eslint --max-warnings 0 --fix --ext .js,.cjs,.mjs,.jsx,.ts,.cts,.mts,.tsx,.vue ./src",
"lint:format": "prettier --write --loglevel warn \"src/*/.{js,ts,json,tsx,css,less,vue,html,md}\"",
"lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.cjs",
"prepare": "husky install"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-3070920230324001",
"@dcloudio/uni-app-plus": "3.0.0-3070920230324001",
"@dcloudio/uni-components": "3.0.0-3070920230324001",
"@dcloudio/uni-h5": "3.0.0-3070920230324001",
"@dcloudio/uni-i18n": "3.0.0-alpha-3071220230324001",
"@dcloudio/uni-mp-alipay": "3.0.0-3070920230324001",
"@dcloudio/uni-mp-baidu": "3.0.0-3070920230324001",
"@dcloudio/uni-mp-jd": "3.0.0-3070920230324001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-3070920230324001",
"@dcloudio/uni-mp-lark": "3.0.0-3070920230324001",
"@dcloudio/uni-mp-qq": "3.0.0-3070920230324001",
"@dcloudio/uni-mp-toutiao": "3.0.0-3070920230324001",
"@dcloudio/uni-mp-weixin": "3.0.0-3070920230324001",
"@dcloudio/uni-quickapp-webview": "3.0.0-3070920230324001",
"@fortawesome/fontawesome-free": "^6.4.0",
"@iconify/iconify": "^3.1.0",
"crypto-js": "^4.1.1",
"echarts": "^5.4.2",
"html2canvas": "^1.4.1",
"lodash-es": "^4.17.21",
"pinia": "^2.0.33",
"qs": "^6.11.1",
"vue": "^3.2.47",
"vue-i18n": "^9.2.2"
},
"devDependencies": {
"@commitlint/cli": "^17.5.1",
"@commitlint/config-conventional": "^17.4.4",
"@dcloudio/types": "^3.3.2",
"@dcloudio/uni-automator": "3.0.0-3070920230324001",
"@dcloudio/uni-cli-shared": "3.0.0-3070920230324001",
"@dcloudio/uni-stacktracey": "3.0.0-3070920230324001",
"@dcloudio/vite-plugin-uni": "3.0.0-3070920230324001",
"@esbuild/darwin-arm64": "0.16.17",
"@iconify/json": "^2.2.42",
"@types/crypto-js": "^4.1.1",
"@types/lodash-es": "^4.17.7",
"@types/node": "^17.0.45",
"@types/qs": "^6.9.7",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"@unocss/preset-icons": "^0.46.5",
"autoprefixer": "^10.4.14",
"eslint": "^8.37.0",
"eslint-plugin-vue": "^9.10.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.0",
"postcss": "^8.4.21",
"prettier": "^2.8.7",
"sass": "^1.60.0",
"typescript": "^5.0.3",
"unocss": "^0.46.5",
"unocss-preset-weapp": "^0.2.5",
"vite": "^3.2.5"
}
}
- 发布:2023-04-06 12:09
- 更新:2023-04-06 12:09
- 阅读:169
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: macos13.2.1
HBuilderX类型: 正式
HBuilderX版本号: 3.7.9
第三方开发者工具版本号: 1.06.2209070
基础库版本号: 2.30.3
项目创建方式: HBuilderX
示例代码:
操作步骤:
uniapp运行微信小程序报Cannot start service: Host version "0.16.17" does not match binary version "0.15.18"
勾选运行时压缩代码会出现此问题,不勾选的话可以正常运行,package.json如下
uniapp运行微信小程序报Cannot start service: Host version "0.16.17" does not match binary version "0.15.18"
勾选运行时压缩代码会出现此问题,不勾选的话可以正常运行,package.json如下
预期结果:
正常拉起微信开发者工具
正常拉起微信开发者工具
实际结果:
[广告] 11:47:40.118 DCloud 2023新春招聘开启,欢迎前端、Android、C++/QT来投简历! 详情点击
11:47:40.151 项目 'case-simulator' 开始编译...
11:47:42.437 请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。若要正式发布,请点击发行菜单或使用 cli 发布命令进行发布
11:47:42.444 正在编译中...
11:47:43.433 uni-app 有新版本发布,请执行 npx @dcloudio/uvm alpha
更新,更新日志详见:https://update.dcloud.net.cn/hbuilderx/changelog/3.7.12.20230331-alpha.html
11:47:48.490 Generated an empty chunk: "enums/platformEnum"
11:47:48.511 Generated an empty chunk: "utils/platform"
11:47:49.011 ✘ [ERROR] Cannot start service: Host version "0.16.17" does not match binary version "0.15.18"
11:47:49.017 1 error
11:47:49.018 [plugin:vite:css-post] The service was stopped
[广告] 11:47:40.118 DCloud 2023新春招聘开启,欢迎前端、Android、C++/QT来投简历! 详情点击
11:47:40.151 项目 'case-simulator' 开始编译...
11:47:42.437 请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。若要正式发布,请点击发行菜单或使用 cli 发布命令进行发布
11:47:42.444 正在编译中...
11:47:43.433 uni-app 有新版本发布,请执行 npx @dcloudio/uvm alpha
更新,更新日志详见:https://update.dcloud.net.cn/hbuilderx/changelog/3.7.12.20230331-alpha.html
11:47:48.490 Generated an empty chunk: "enums/platformEnum"
11:47:48.511 Generated an empty chunk: "utils/platform"
11:47:49.011 ✘ [ERROR] Cannot start service: Host version "0.16.17" does not match binary version "0.15.18"
11:47:49.017 1 error
11:47:49.018 [plugin:vite:css-post] The service was stopped
bug描述:
uniapp运行微信小程序报Cannot start service: Host version "0.16.17" does not match binary version "0.15.18",
勾选运行时压缩代码会出现此问题,不勾选的话可以正常运行,package.json如下
试过以下方法没有解决问题
step1:使用命令npx @dcloudio/uvm
step2:降低package.json内vite版本,把vite降为3.x来进行调试
0 个回复