JoBinsJP / formjs

A wrapper for the axios and form helper; inspired from inertia JS.
MIT License
13 stars 0 forks source link

Unmatched Peer Dependencies Warning on npm for Vue 2 and Vue 3 Compatibility (No Warning with Yarn) #25

Open Thiritin opened 1 week ago

Thiritin commented 1 week ago

Hi, the project requires vuejs2 so installing is not possible as per package.json

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: undefined@undefined
npm error Found: vue@3.5.3
npm error node_modules/vue
npm error   dev vue@"^3.4.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer vue@"^2.7.0" from formjs-vue2@1.4.0
npm error node_modules/formjs-vue2
npm error   formjs-vue2@"^1.4.0" from the root project
Thiritin commented 1 week ago

Wait... it it does work with yarn but not npm. weird. Maybe npm packages are not up 2 date?

Edit, I am stupid apparently the project only exists on yarn and not npm. Is there a maintainer for the project? Maybe it's possible to release under a different name under yarn and npm? Given the maintainer exists and has time.

bedus-creation commented 1 week ago

Thank you for trying it out.

The issue stems from unmatched peer dependencies between Vue 2 and Vue 3. Yarn doesn't display a warning, but npm does. We should consider a separate release for Vue 3. Meanwhile, you can use the following command to force install with npm:

npm install --force