Skip to content

[inversify-express-utils] inversify-express-utils 6.4.8 not compatible with inversify 6.1.6 (cannot find module in import) #1668

@martin-wrodarczyk-webcom

Description

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

Problem

When using the following dependencies in a project:

  • inversify-express-utils version: 6.4.8
  • inversify version: 6.1.6

The build process fails with the following error:

node_modules/inversify-express-utils/lib/decorators.d.ts:3:57 - error TS2307: Cannot find module 'inversify/lib/annotation/decorator_utils' or its corresponding type declarations.

export declare const injectHttpContext: (target: import("inversify/lib/annotation/decorator_utils").DecoratorTarget, targetKey?: string | symbol, indexOrPropertyDescriptor?: number | TypedPropertyDescriptor<unknown> | undefined) => void;`

Cause

The error occurs because the file path inversify/lib/annotation/decorator_utils does not exist in the inversify package version 6.1.6. It appears that this path was removed or refactored in recent versions of inversify, which causes inversify-express-utils to reference a non-existent file.

Steps to reproduce

  1. Adding inversify 6.1.6 as dependency
  2. Adding inversify-express-utils 6.4.8 as dependency
  3. yarn build

Expected behavior

The project should build without errors when compatible versions of inversify and inversify-express-utils are used.

Possible solution

No response

Package version

6.1.6

Node.js version

20.15.0

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Stack trace

No response

Other

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions