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
wrong version of dependency imported with duplicate dependencies using preact-cli #1616
Comments
Can you provide a reproduction? |
Sorry, was just on holiday for a few days so didn't see this response! The Thanks! |
No worries, thanks for providing that. Seems to be an issue with how we resolve dependencies at the moment, nothing for you to solve in user config I believe. Will try to get a fix together. |
Okay so this is a tad hacky, but will unblock you for the time and won't create issues if/when we do get this fixed. // preact.config.js
export default (config, env, helpers) => {
const modules = config.resolve.modules;
if (modules[2] === 'node_modules') {
modules.splice(2, 1);
modules.unshift('node_modules')
}
} |
My preact app uses
fp-ts@2
. The app has a dependency onarya
which has a dependency onfp-ts@1.19
When I build or watch using
preact-cli
then myarya
library gets built againstfp-ts@2
. This causes errors because the interfaces are different.It's possible that this is a webpack configuration issue, as I have found a similar issue here: webpack/webpack#6538
It's not clear to me how to apply the solution provided in that issue in context of preact-cli, so any help/advice would be appreciated.
Thanks.
The text was updated successfully, but these errors were encountered: