Closed Snnerney closed 3 months ago
Bot detected the issue body's language is not English, translate it automatically.
Title: 🐛 [Bug]:
机器人检测到问题正文的语言不是英语,并自动翻译。
标题: 🐛 [Bug]:
Pulling dev branch code from github to pnpm i to pull dependencies, running with pnpm dev I get the above error, I try to delete node_modeules reinstall still get the above error
@Noospic 你可以尝试在 internals/vite-plugin-template2jsx/package.json
中加上:
"dependencies": {
"lodash-es": "^4.17.21",
"fs-extra": "^11.2.0",
++ "vue": "2.6.14",
"vue-template-compiler": "2.6.14",
"html-dom-parser": "~5.0.8"
},
看下是否能解决问题?
我这边没有复现这个问题,但是看你发的报错信息,应该是 vite-plugin-template2jsx
这个子包中引入了 vue-template-compiler
,这个依赖包的依赖里有一个 vue
,这个 vue 是从上层目录找的,但是上层目录找不到。
"devDependencies": {
"vue": "file:../.."
}
于是会继续引用更上层的 vue,就是根目录的 vue:
"vue": "^3.4.23"
但是根目录的 vue 版本号 3.4.23 和 vue-template-compiler
版本号 2.6.14 匹配不上,于是报了你截图的错误。
Bot detected the issue body's language is not English, translate it automatically.
@Noospic You can try adding: in
internals/vite-plugin-template2jsx/package.json
:"dependencies": { "lodash-es": "^4.17.21", "fs-extra": "^11.2.0", ++ "vue": "2.6.14", "vue-template-compiler": "2.6.14", "html-dom-parser": "~5.0.8" },
See if that solves the problem?
Version
opentiny-vue@3.14.0
Vue Version
"vue": "^3.4.23"
Link to minimal reproduction
D:\download-browser\tiny-vue-dev1\tiny-vue-dev\node_modules.pnpm\vue-template-compiler@2.6.14_vue@3.4.23typescript@5.5.4\node_modules\vue-template-compiler\index.js:10 throw new Error( ^
Error:
Vue packages version mismatch:
This may cause things to work incorrectly. Make sure to use the same version for both. If you are using vue-loader@>=10.0, simply update vue-template-compiler. If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
Node.js v18.12.0 ELIFECYCLE Command failed with exit code 1. ELIFECYCLE Command failed with exit code 1.
Step to reproduce
从github上拉取dev分支代码进行pnpm i拉取依赖,使用pnpm dev运行出现以上错误,我试图删除node_modeules重新安装还是出现以上错误
What is expected
No response
What is actually happening
No response
What is your project name
TinyVue
Any additional comments (optional)
No response