Skip to content
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

fix(webpack): downgrade dev-middleware to fix peer dep issue #21626

Merged
merged 1 commit into from Jun 18, 2023

Conversation

Lehoczky
Copy link
Contributor

@Lehoczky Lehoczky commented Jun 18, 2023

πŸ”— Linked issue

Resolves #21543

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR aims to remove ^ajv@8.0.0 from the dependencies to avoid peer-dependency issues. ^ajv@8.0.0 was introduced by schema-utils@^4.0.0 which was introduced by webpack-dev-middleware@5.2.2.

By pinning webpack-dev-middleware to a version before 5.2.2, we can avoid having ^ajv@8.0.0 as a dependency.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe
Copy link
Member

Thank you ❀️

@danielroe danielroe merged commit 2353db0 into nuxt:2.x Jun 18, 2023
13 checks passed
@danielroe danielroe changed the title fix(webpack): downgrade dev-middleware to avoid peer dependency issue fix(webpack): downgrade dev-middleware to fix peer dep issue Jun 18, 2023
@ikselll
Copy link

ikselll commented Jun 19, 2023

Thanks - that was really quick πŸš€

@ikselll
Copy link

ikselll commented Jul 20, 2023

@Lehoczky @danielroe I checked the test repo and the problem persists.

nuxt-ajv git:(master) βœ— npm run show-issue

> nuxt-ajv@1.0.0 show-issue
> npx check-peer-dependencies

  βœ…  ajv ^6.9.1 is required by ajv-keywords@3.5.2 (6.12.6 is installed)
  βœ…  ajv >=5.0.0 is required by ajv-errors@1.0.1 (6.12.6 is installed)
  ❌  ajv ^8.8.2 is required by ajv-keywords@5.1.0) (6.12.6 is installed)

nuxt-ajv git:(master) βœ— npm ls
nuxt-ajv@1.0.0 /Users/ikselll/projects/ikselll/nuxt-ajv
β”œβ”€β”€ check-peer-dependencies@4.2.0
β”œβ”€β”€ core-js@3.31.1
β”œβ”€β”€ nuxt@2.17.1
β”œβ”€β”€ vue-server-renderer@2.7.14
β”œβ”€β”€ vue-template-compiler@2.7.14
└── vue@2.7.14

➜  nuxt-ajv git:(master) βœ— npm ls webpack-dev-middleware
nuxt-ajv@1.0.0 /Users/ikselll/projects/ikselll/nuxt-ajv
└─┬ nuxt@2.17.1
  └─┬ @nuxt/webpack@2.17.1
    └── webpack-dev-middleware@5.3.3

@Lehoczky
Copy link
Contributor Author

I'm gonna look into it, probably one of the other dependencies has been updated to use a newer version of schema utils.

Is this issue causing any runtime errors for you, or is it just npm complaining? Asking to know how to prioritize this one.

@ikselll
Copy link

ikselll commented Jul 20, 2023

I have a npm lint script like that:

"lint": "check-peer-dependencies && eslint --ext .js,.vue .",

plus husky hooks on commit.

So no - it's not runtime but I think it's important to check it regularly and not disabling it because of ajv mismatch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants