InversifyJS: Injecting the class which extends non-injectable external module

Need help on implementation related to Inversify. I am creating a class which is extending EventEmitter from node. when I try to use inversify it says EventEmitter is not injectable. Following is...

TypeScript Types without importing classes?

I'm about to try implementing some IoC/DI framework in our application (thinking of Inversify, if there are any other recommendations) but we still have the problem of having to include the files...

Missing @inject annotation, which isn't missing in inversify with an extending class

I'm having a problem which seems a bit hard to put into a title, which is why you've gotten this beast of a title. I get an error stating: Error: Missing required @inject or @multiInject...

InversifyJS : can not bind using interface

I am trying to use inversify JS to inject dependencies on TypeScript App. I started by using the example of https://github.com/inversify/InversifyJS page : // file interfaces.ts interface Warrior...

TypeError: Reflect.hasOwnMetadata is not a function

I am trying to use inversify with typescript and node.js. I am currently using node.js version 6.9.1, typescript version 2.6.2, and ECMAScript 6. When I try to run the node.js application, I...

Node Sass does not yet support Windows 64-bit

I am running protractor UI automation project and try to run test with yarn test and received following build error Module build failed: Error: Node Sass does not yet support your current...

How to achieve component scanning/auto discovery of Controllers using Inversify + inversify-express-utils

I am looking for a way to load my controller classes in Inversify that are annotated with @controller() from inversify-express-utils without needing to manage a hand crafted/manually constructed...

Babel 7 + Inversify 4 + WebPack 4 - Unexpected character '@' on @inject

I have a typescript Vue SPA project where I use Inversify. I used awesome-typescript-loader for compiling my typescript source code; now I want to switch to Babel but when I compile my application...

Inversify composition root for constructor injection

I am from c# background. I am new to Angular 6. I learnt that there is lib similar to ninject for DI. Inversify. I tried to use it in an application. I did configure Bindings and...

Inversify dependency injection not injecting dependencies into constructor

I have followed the guide on npm and github for inversify to configure dependency injection in my Typescript project. I have a controller, a service and a router. The service is injected into the...

Why is my property injection attempt not injecting anything but undefined?

I have an existing typescript project using inversify. I have defined a logger in my TYPES at TYPES.ILoggger and when I access the logger directly from my container it works: import {ILogger} from...

Angular + Jest: Error: Uncaught (in promise): Failed to load C:footer.component.html

Unfortunately, I can't get Jest to work. I want to use it to build unit tests for my Angular webapp. I just noticed the following post, but nothing worked for me:...

Implementing dependency injection using Vue and Typescript

I tried using vue-injector but it compile with my version of Vue (2.6.10) and Typescript (3.4.5). I see very few other options. On the pure typescript side I see things like Inversify and TSyringe...

Vue obfuscation best practices

Hello there dev community. I´m trying to obfuscate a Vue app using (https://github.com/javascript-obfuscator/webpack-obfuscator) webpack-obfuscator vue.config.js configureWebpack: { plugins:...

joi_1.default.validate is not a function

I want to validate my Express routes before calling the controller logic. I use joi and created a validator which is able to validate the Request object against the schema object import { Request,...

Cannot Inject Dependency Into Derived Class

I have a relatively simple setup with three classes. I am using inversify for dependency injection. But when injecting the class MessageBroker into the derived class Repository the MessageBroker...

create react app error - Cannot find name 'describe'

I am using create react app with Jest and I am getting the following error: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm...

Inversify cannot inject class with dependencies

I started a new typescript project based an old project of mime (which started as plain javascript) and I can't get any non-trivial injection working. I know about nothing about babel...

InversifyJS @multiInject not working, throws error "Ambiguous match found for serviceIdentifier"

I am using inversifyJs for DI in my typescript project. When using the decorator @multiInject, I am getting the error "Ambiguous match found for serviceIdentifier". I am following this example...

Custom Decorator Typescript Mongoose

I'm trying to create a custom class decorator, that creates an instance of a repository class, the snippet below represents the "decorator" and the "repository". import UserModel, { User } from...

How to bind instance to inversify container

I'm using inversify with inversify-express-utils. I have a quite usual inversify/express setup. Controller Service A module B module B module is a class that looks like this: import {...

Error method: runtime error: invalid memory address or nil pointer dereference)

I'm working on a nest.js microservices project. The controllers and services are defined and the back-end runs without errors. I'm trying to create a resource(subscriptionPlan in this example)...

Exclude @npm// Dependencies from Bazel Dependency Graph (bazel query)

I use the following commands to generate a graph for my Bazel project. bazel query 'deps(//services/gateway:lib)' --output graph --nohost_deps --noimplicit_deps > graph.in dot -Tpng < graph.in >...

Inversify Tagged vs Named bindings with autoBindInjectable

I've been trying to understand the difference between Inversify @tagged and @named bindings. I cannot seem to find any documentation which defines the difference between the two. They seem...

Decorator to call a method before any other messes with "this" context

Real problem I think I found my real problem, inversify and everything else works fine. In the original post I omitted some part of my code because I didn't think they were causing the problem. In...

Unable to catch errors globally from inversify-express-utils controllers

I'm using this package https://github.com/inversify/inversify-express-utils for a nodejs app, and I want to have a place to handle errors from any controller, the way I know is to use express...

class circular dependency resolve with inversifyJS

I have tried to understand how to resolve circular dependencies using InversifyJS but I'm still having an issue. I have a class Leader which needs to have a Follower and the Follower instance must...

Error during initialization: No matching bindings found for serviceIdentifier: Symbol(LicencesService)

I am getting error while compiling the code : No matching bindings found for serviceIdentifier: Symbol(LicencesService) Following is the code associated with the issue. The issue is with the...

How to build multiple npm packages for sharing?

I'm trying to create a mono repository to host multiple small packages that I plan to deploy on npm. I use Rollup for the bundling part. After many hours watching what others do, searching on the...

VSCode not building latest code from docker

I have a scenario where I have installed a python project on docker (ubuntu) and I have attached VSCode to the running container so it allows me to edit my code reactJS code in my windows...