hattipjs / hattip

Like Express, but for the future
MIT License
1.28k stars 17 forks source link

Bugfix: Don't explicitly specify fixed `vite` version #141

Closed pepyta closed 3 months ago

pepyta commented 7 months ago

Reason

When using the @hattip/vite package and run the npm install command in a project, then you get the following error:

npm ERR! Found: vite@5.2.9
npm ERR! node_modules/vite
npm ERR!   vite@"^5.2.9" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"4 | 5" from @hattip/vite@0.0.45
npm ERR! node_modules/@hattip/vite
npm ERR!   dev @hattip/vite@"^0.0.45" from the root project

This is caused by fixing the version to either match explicitly the 4 or 5 versions, but fails on every other sub-release of these major releases.

Fix

Allow every sub-release of the 4 and 5 major versions.

Sidenote

Using pnpm install will not fail, but give you a warning instead of this exact issue.

cyco130 commented 3 months ago

Good catch, thank you for your contribution! Will release today.