8000 Could not resolve dependency: npm ERR! peer mongodb@"^5.2.0" from @feathersjs/mongodb@5.0.9 · Issue #3286 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content

Could not resolve dependency: npm ERR! peer mongodb@"^5.2.0" from @feathersjs/mongodb@5.0.9 #3286

@MarcGodard

Description

@MarcGodard

Steps to reproduce

Using node version: v18.18.0

Create a new project with the following values:

marcgodard@pop-os:~/Documents/Github$ npm create feathers@latest feathers-chat
Need to install the following packages:
create-feathers@5.0.9
Ok to proceed? (y) 
? Do you want to use JavaScript or TypeScript? JavaScript
? Write a short description 
? Which HTTP framework do you want to use? KoaJS (recommended)
? What APIs do you want to offer? HTTP (REST), Real-time
? Which package manager are you using? npm
? Generate client? Can be used with React, Angular, Vue, React Native, Node.js etc. No
? What is your preferred schema (model) definition format? Schemas allow to type, validate, secure and populate your data and configuration JSON schema
? Which database are you connecting to? Databases can be added at any time MongoDB
? Enter your database connection string mongodb://127.0.0.1:27017/feathers-chat
    Wrote file test/app.test.js
    Wrote file src/app.js
    Wrote file src/channels.js
    Wrote file config/default.json
    Wrote file config/test.json
    Wrote file config/custom-environment-variables.json
    Wrote file src/configuration.js
    Wrote file public/index.html
    Wrote file src/index.js
    Wrote file src/logger.js
    Wrote file src/hooks/log-error.js
    Wrote file package.json
    Wrote file .prettierrc
    Wrote file readme.md
    Wrote file src/services/index.js
    Wrote file src/validators.js
    Wrote file src/mongodb.js
    Updated src/app.js
    Updated src/validators.js
    Running npm install --save
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: feathers-chat@0.0.0
npm ERR! Found: mongodb@6.1.0
npm ERR! node_modules/mongodb
npm ERR!   mongodb@"^6.1.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer mongodb@"^5.2.0" from @feathersjs/mongodb@5.0.9
npm ERR! node_modules/@feathersjs/mongodb
npm ERR!   @feathersjs/mongodb@"^5.0.9" 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.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /home/marcgodard/.npm/_logs/2023-09-30T15_14_16_178Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /home/marcgodard/.npm/_logs/2023-09-30T15_14_16_178Z-debug-0.log
Error: undefined


Hooray! Your Feathers app is ready to go! 🚀
Go to the feathers-chat folder to get started.

To learn more visit https://feathersjs.com/guides

When adding it to another project.

marcgodard@pop-os:~/Documents/Github/swp-api$ npm i mongodb
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: swp-api@0.0.0
npm WARN Found: mongodb@5.9.0
npm WARN node_modules/mongodb
npm WARN   peer mongodb@"^5.2.0" from @feathersjs/mongodb@5.0.9
npm WARN   node_modules/@feathersjs/mongodb
npm WARN     @feathersjs/mongodb@"^5.0.9" from the root project
npm WARN   1 more (the root project)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer mongodb@"^5.2.0" from @feathersjs/mongodb@5.0.9
npm WARN node_modules/@feathersjs/mongodb
npm WARN   @feathersjs/mongodb@"^5.0.9" from the root project

changed 2 packages, and audited 703 packages in 2s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0