Skip to content

Resolve dependency error with reflect-metadata #1556

@Bedjes-Studio

Description

@Bedjes-Studio

I'm submitting a...


[x] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request

Current behavior

ERESOLVE unable to resolve dependency tree when installing the module

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/reflect-metadata
npm error   reflect-metadata@"^0.2.0" from the root project
npm error   peer reflect-metadata@"^0.1.12 || ^0.2.0" from @nestjs/[email protected]
npm error   node_modules/@nestjs/common
npm error     @nestjs/common@"^10.0.0" from the root project
npm error     peer @nestjs/common@"^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0" from @nestjs/[email protected]
npm error     node_modules/@nestjs/azure-func-http
npm error       @nestjs/azure-func-http@"*" from the root project
npm error     5 more (@nestjs/core, @nestjs/microservices, ...)
npm error   3 more (@nestjs/core, @nestjs/microservices, @nestjs/websockets)
npm error
npm error Could not resolve dependency:
npm error peer reflect-metadata@"^0.1.13" from @nestjs/[email protected]
npm error node_modules/@nestjs/azure-func-http
npm error   @nestjs/azure-func-http@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

Can be installed with the --force option.

Expected behavior

Npm installation runs without errors

Minimal reproduction of the problem with instructions

$ npm i -g @nestjs/cli

$ nest new project-name
// use NPM

$ cd project-name

$ nest add @nestjs/azure-func-http
// FAIL

$ npm install @nestjs/azure-func-http
// FAIL with the error ERESOLVE unable to resolve dependency tree when installing the module

What is the motivation / use case for changing the behavior?

Reducting technical dept.

Environment


Nest version: 10.4.4 (latest)

 
For Tooling issues:
- Node version:  v20.17.0 (latest LTS)
- NVM version: 1.1.12
- NPM version: 10.8.2
- Platform:  Windows 10

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