Skip to content

npm's latest v0.21.5 is not compatible with vite@5.2.11 #144

@metzg

Description

@metzg

Describe the bug

Hi,

It seems the latest published version on npm is outdated and not compatible with vite 5.

On a blank Vue project (i.e. minimal repro):

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: vite-plugin-md@0.22.5
npm WARN Found: vite@5.2.11
npm WARN node_modules/@yankeeinlondon/builder-api/node_modules/vite
npm WARN   peer vite@"^5.0.0" from @vitejs/plugin-vue@5.0.4
npm WARN   node_modules/@yankeeinlondon/builder-api/node_modules/@vitejs/plugin-vue
npm WARN     peer @vitejs/plugin-vue@">=2.3.4" from vite-plugin-md@0.22.5
npm WARN     node_modules/@yankeeinlondon/builder-api/node_modules/vite-plugin-md
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer vite@"^4.0.0 || ^3.0.0" from vite-plugin-md@0.22.5
npm WARN node_modules/@yankeeinlondon/builder-api/node_modules/vite-plugin-md
npm WARN   vite-plugin-md@">=0.22.5" from @yankeeinlondon/builder-api@1.4.1
npm WARN   node_modules/@yankeeinlondon/builder-api
npm WARN 
npm WARN Conflicting peer dependency: vite@4.5.3
npm WARN node_modules/vite
npm WARN   peer vite@"^4.0.0 || ^3.0.0" from vite-plugin-md@0.22.5
npm WARN   node_modules/@yankeeinlondon/builder-api/node_modules/vite-plugin-md
npm WARN     vite-plugin-md@">=0.22.5" from @yankeeinlondon/builder-api@1.4.1
npm WARN     node_modules/@yankeeinlondon/builder-api

On an existing project:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: md-test@0.0.0
npm ERR! Found: vite@5.2.11
npm ERR! node_modules/vite
npm ERR!   dev vite@"^5.2.8" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"^4.0.0" from vite-plugin-md@0.21.5
npm ERR! node_modules/vite-plugin-md
npm ERR!   dev vite-plugin-md@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Reproduction

npm create vue@latest && npm i --save-dev vite-plugin-md

System Info

Binaries:
    Node: 20.9.0 - /usr/bin/node
    Yarn: 1.22.19 - /snap/bin/yarn
    npm: 8.15.0 - /usr/local/bin/npm


### Used Package Manager

npm

### Validations

- [X] Follow our [Code of Conduct](https://github.com/antfu/.github/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guide](https://github.com/antfu/contribute).
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- [X] The provided reproduction is a [minimal reproducible](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

### Contributions

- [ ] I am willing to submit a PR to fix this issue
- [ ] I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions