Missing required @injectable annotation error #1563
Unanswered
manoj30075
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm building a Jupyterlab extension, it uses webpack to to create build. My code is in TypeScript. This extension runs in a browser. Below is the shortened code that I have to inject the dependencies.
`
import { inject, injectable } from 'inversify';
@Injectable()
export class LocalTelemetry implements TelemetryService {
constructor(
@Inject(NAMES.customerId)
private customerId: string = '',
@Inject(NAMES.outputChannelTelemetry)
private OutputChannel: Logger
) {}
`
In the browser console I'm getting this error.
Error: Missing required @injectable annotation in: LocalTelemetry. at getTargets (reflection_utils.js:25:1) at getDependencies (reflection_utils.js:18:1) at planner.js:101:47 at Array.forEach (<anonymous>) at _createSubRequests (planner.js:89:1) at plan (planner.js:131:1) at container.js:604:31 at Container._get (container.js:574:1) at Container._getButThrowIfAsync (container.js:577:1) at Container.get (container.js:352:1)
What am I doing wrong here? I'm not able to find the solution for this. Thanks for help in advance.
Beta Was this translation helpful? Give feedback.
All reactions