nestjs / azure-func-http

Azure Functions HTTP adapter for Nest framework (node.js) 🌥
https://nestjs.com/
MIT License
151 stars 42 forks source link

Resolve dependency error with reflect-metadata #1556

Open Bedjes-Studio opened 2 months ago

Bedjes-Studio commented 2 months ago

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: project-name@0.0.1
npm error Found: reflect-metadata@0.2.2
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/common@10.4.1
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/azure-func-http@0.10.0
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/azure-func-http@0.10.0
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