New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue packages version mismatch error in non-Vue project #748
Comments
Perhaps |
@iacobfred seems like problem in vue-template-compiler - it's trying to resolve 'vue' dependency, in case it was found in node_modules of your project it's trying to check if version of vue if compatible with current version of vue-template-compiler (which is 2.7.14 in context of lates i18next-parser). I assume if you'll run There is two potential solution:
const fs = require('fs');
const vueTemplateCompilerIndex = fs.readFileSync(
'node_modules/vue-template-compiler/index.js',
'utf-8',
);
// replace with some fake package
const fixedVueTemplateCompilerIndex = vueTemplateCompilerIndex.replace(
"require('vue').version",
"require('vue2').version",
);
if (fixedVueTemplateCompilerIndex === vueTemplateCompilerIndex) {
return process.exit(0);
}
fs.writeFileSync('node_modules/vue-template-compiler/index.js', fixedVueTemplateCompilerIndex, {
flag: 'w',
}); Thus verification of vue and vue-template-compiler versions will be ignored NOTE! This solutions are valid only in case you are sure that vue is not used somehow, like in your case or in case your are using i18next, i18next-parser for BE projects only |
It's pretty sad, that there's no proper fix for this... |
In our monorepo another project uses vue version 3, so in conclusion this package is useless for us? |
When I tried to run the cli, I got the following error:
I'm not using Vue templates (I'm using JSX in a Next.js project), so I don't think it should be necessary for me to install any version of vue-template-compiler...
The text was updated successfully, but these errors were encountered: