package.json 文件内容如下,使用 import { createI18n } from 'vue-i18n'
后出现上述问题
{
"name": "uni-vue3-template",
"version": "0.0.0",
"private": true,
"scripts": {
"dev:app": "uni -p app",
"dev:app-android": "uni -p app-android",
"dev:app-ios": "uni -p app-ios",
"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-jd": "uni -p mp-jd",
"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:mp-xhs": "uni -p mp-xhs",
"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:app-android": "uni build -p app-android",
"build:app-ios": "uni build -p app-ios",
"build:custom": "uni build -p",
"build:h5": "uni build",
"build:h5:ssr": "uni build --ssr",
"build:mp-alipay": "uni build -p mp-alipay",
"build:mp-baidu": "uni build -p mp-baidu",
"build:mp-jd": "uni build -p mp-jd",
"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",
"build:mp-xhs": "uni build -p mp-xhs",
"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:fix": "eslint --fix"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-4020320240708001",
"@dcloudio/uni-app-plus": "3.0.0-4020320240708001",
"@dcloudio/uni-components": "3.0.0-4020320240708001",
"@dcloudio/uni-h5": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-alipay": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-baidu": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-jd": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-lark": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-qq": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-toutiao": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-weixin": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-xhs": "3.0.0-4020320240708001",
"@dcloudio/uni-quickapp-webview": "3.0.0-4020320240708001",
"@vueuse/core": "^10.9.0",
"axios": "^1.6.8",
"dayjs": "^1.11.11",
"lodash-es": "^4.17.21",
"pinia": "^2.1.7",
"vue": "3.4.21",
"vue-i18n": "^9.13.1",
"wot-design-uni": "^1.3.2"
},
"devDependencies": {
"@dcloudio/types": "^3.4.11",
"@dcloudio/uni-automator": "3.0.0-4020320240708001",
"@dcloudio/uni-cli-shared": "3.0.0-4020320240708001",
"@dcloudio/uni-stacktracey": "3.0.0-4020320240708001",
"@dcloudio/vite-plugin-uni": "3.0.0-4020320240708001",
"@eslint/js": "^9.6.0",
"@mini-types/alipay": "^3.0.14",
"@vue/runtime-core": "3.4.21",
"eslint": "^9.6.0",
"eslint-plugin-vue": "^9.27.0",
"globals": "^15.8.0",
"miniprogram-api-typings": "^3.9.1",
"prettier": "^3.3.2",
"sass": "^1.62.1",
"unplugin-auto-import": "^0.17.6",
"vite": "5.2.8"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0",
"pnpm": ">=9"
}
}
y***@163.com
9.19 也不行,同样回报错,cli安装默认就是9.19 的版本
2024-08-30 17:06
BFC
回复 y***@163.com: 可以检查一下node_modules里面的vue-i18n版本是不是9.1.9。或者直接不用安装vue-i18n。因为cli已经安装过了vue-i18n。 直接在代码里面使用 import xxx from 'vue-i18n'
2024-08-30 17:13