Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INVERSITY-EXPRESS-EXAMPLE cannot run BindingDecorators #1406

Open
wasdueyesterday opened this issue Dec 15, 2021 · 0 comments
Open

INVERSITY-EXPRESS-EXAMPLE cannot run BindingDecorators #1406

wasdueyesterday opened this issue Dec 15, 2021 · 0 comments

Comments

@wasdueyesterday
Copy link

Expected Behavior

I'm studying INVERSIFY-EXPRESS-EXAMPLE.

According to README, I can start the service with the command ts-node BindingDecorators/bootstrap.ts.

Current Behavior

However, when I run it, i got the error "No matching bindings found for serviceIdentifier: Symbol(UserService)".

Possible Solution

This link discusses a similar issue and the answer points out the general solution to the error

However, I need some help to determine where the problem is. Is it the example or the lib? Most likely it's the example and the unit test is not catching the error? It's also possible that the problem is mine as I'm very new to type script and inversify.

Steps to Reproduce (for bugs)

  1. Sync down the code from INVERSIFY-EXPRESS-EXAMPLE
  2. Follow README and run ts-node BindingDecorators/bootstrap.ts after running command ahead of this
  3. Encounter error Error: No matching bindings found for serviceIdentifier: Symbol(UserService)

Context

I'm studying the example to learn the module

Your Environment

  • Version used:
    See package.json
  • Environment name and version (e.g. Chrome 39, node.js 5.4):
    node: v14.18.2
    tsc: 4.5.2
  • Operating System and version (desktop or mobile):
    mac os 11.4
    vscode latest
  • Link to your project:
    The project is INVERSIFY-EXPRESS-EXAMPLE

Stack trace

Error: No matching bindings found for serviceIdentifier: Symbol(UserService) at _validateActiveBindingCount (/inversify-express-example/node_modules/inversify/src/planning/planner.ts:113:23) at _getActiveBindings (/inversify-express-example/node_modules/inversify/src/planning/planner.ts:91:5) at _createSubRequests (/inversify-express-example/node_modules/inversify/src/planning/planner.ts:163:26) at /inversify-express-example/node_modules/inversify/src/planning/planner.ts:197:17 at Array.forEach () at inversify-express-example/node_modules/inversify/src/planning/planner.ts:196:26 at Array.forEach () at _createSubRequests (inversify-express-example/node_modules/inversify/src/planning/planner.ts:167:20) at Object.plan (/inversify-express-example/node_modules/inversify/src/planning/planner.ts:243:9) at /inversify-express-example/node_modules/inversify/src/container/container.ts:367:27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant