question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: cannot build injector

See original GitHub issue

Following ‘DEVELOPMENT.md’, i got the following error:

git clone https://github.com/deepkit/deepkit-framework.git
cd deepkit-framework
npm install
npm run bootstrap
npm run link
npm run install-compiler
npm run tsc      

> root@ tsc /Users/chenyuwang/deepkit-framework
> tsc --build

packages/injector/src/injector.ts:374:62 - error TS2339: Property 'getType' does not exist on type 'TypeParameter'.

374                 const tokenType = getInjectOptions(parameter.getType() as Type);
                                                                 ~~~~~~~

packages/injector/src/injector.ts:377:50 - error TS2339: Property 'getType' does not exist on type 'TypeParameter'.

377                     type: tokenType || parameter.getType() as Type,
                                                     ~~~~~~~

packages/injector/src/injector.ts:378:42 - error TS2339: Property 'isValueRequired' does not exist on type 'TypeParameter'.

378                     optional: !parameter.isValueRequired()
                                             ~~~~~~~~~~~~~~~

packages/injector/src/injector.ts:379:76 - error TS2339: Property 'name' does not exist on type 'ReflectionFunction'.

379                 }, provider, compiler, resolveDependenciesFrom, reflection.name || 'useFactory', args.length, 'constructorParameterNotFound'));
                                                                               ~~~~

packages/injector/src/injector.ts:374:62 - error TS2339: Property 'getType' does not exist on type 'TypeParameter'.

374                 const tokenType = getInjectOptions(parameter.getType() as Type);
                                                                 ~~~~~~~

packages/injector/src/injector.ts:377:50 - error TS2339: Property 'getType' does not exist on type 'TypeParameter'.

377                     type: tokenType || parameter.getType() as Type,
                                                     ~~~~~~~

packages/injector/src/injector.ts:378:42 - error TS2339: Property 'isValueRequired' does not exist on type 'TypeParameter'.

378                     optional: !parameter.isValueRequired()
                                             ~~~~~~~~~~~~~~~

packages/injector/src/injector.ts:379:76 - error TS2339: Property 'name' does not exist on type 'ReflectionFunction'.

379                 }, provider, compiler, resolveDependenciesFrom, reflection.name || 'useFactory', args.length, 'constructorParameterNotFound'));
                                                                               ~~~~


Found 8 errors.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
TheNightmareXcommented, May 30, 2022

the author mistakenly pushed a commit from another branch with different api, so there are type errors. you can reset to any commits before feature(injector): Allow to use Inject<> in factories.

1reaction
marcjcommented, Jul 4, 2022

Closing since this is fixed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug: Cannot use spread with the injector (Injection ... - GitHub
I'm submitting a bug report Library Version: 1.4.1 (Webpack build uses native-modules dist) Please tell us about your environment: Operating ...
Read more >
How to fix "Cannot read injector property of null" bug in ...
But having done that, I get the error Cannot read property 'injector' of null. My test is relatively basic: import { inject, addProviders...
Read more >
Clogged fuel injectors diagnostics and possible ways to repair
Clogged fuel injectors does not need to be replaced. They can be unclogged with the right fuel injector cleaner procedures. such as ultrasonic...
Read more >
Injectors issues and solutions - O.G.S. Mechanics
Clogged Fuel Injector Problem. Fuel Injectors can clog from the build-up of foreign objects, most commonly rust. This is normally the case if...
Read more >
Issues for Asset Injector | Drupal.org
Title Status Pri... Unexpected error while listing existing assests Postponed (maintainer needs more info) No... Improve form labels and descriptions Needs review No... Code text input...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found