Comments (4)
yes please, PR welcome
from inversifyjs.
Actually primitive types apparently also cause issues. Using a number instead of undefined
results in the following stacktrace
/project/node_modules/inversify/lib/container/container.js:467
throw new Error(ERROR_MSGS.ON_DEACTIVATION_ERROR(constructor.name, ex.message));
^
Error: onDeactivation() error in class Number: Reflect.hasMetadata is not a function
at Container._deactivate (/project/node_modules/inversify/lib/container/container.js:467:19)
at Container._deactivateIfSingleton (/project/node_modules/inversify/lib/container/container.js:634:21)
at Container._deactivateSingletons (/project/node_modules/inversify/lib/container/container.js:639:31)
at /project/node_modules/inversify/lib/container/container.js:287:19
at /project/node_modules/inversify/lib/container/lookup.js:113:13
at Map.forEach (<anonymous>)
at Lookup.traverse (/project/node_modules/inversify/lib/container/lookup.js:112:19)
at Container.unbindAll (/project/node_modules/inversify/lib/container/container.js:286:33)
at file:///project/inversify-bug.mjs:10:11
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
from inversifyjs.
I'm happy to contribute to make this work again if it's intended to work with primitive types. If it's not it would be nice to state that somewhere
from inversifyjs.
Added to milestone 6.0.3
, we will aim to resolve this regression as a priority. cc @PodaruDragos
from inversifyjs.
Related Issues (20)
- TypeError: Converting circular structure to JSON HOT 1
- Remove `browser` test suite HOT 5
- container.onNoMatchingBindingsFount or .onError
- The error middleware throws unhandler error for first container config and last router
- How to inject method parameter HOT 1
- Last release was on Oct 14, 2021 HOT 8
- postConstruct inconsistency for sync and async
- Whether the inclusion size can be optimized
- Major bug, request scope in a singleton class is not working HOT 1
- Migrate to Monorepo HOT 2
- "TypeScript's constructor assignments" is not working HOT 2
- Decorator[@targetName] error TS1239: Unable to resolve signature of parameter decorator when called as an expression HOT 3
- Warn for mixing singleton with non-singleton scopes
- Option `skipBaseClassChecks` has no effect when inheritance is being used
- Moving from Symbol.for() to Symbol() doesn't resolve dependencies correctly HOT 1
- getAllAsync fails when used with .toService and async .toDynamicValue
- Unsafe type with some BindingToSyntax
- Conflict test case found for type definition.
- Support for Open API documentation auto generation in express utils and other frameworks HOT 1
- Injecting an object with a .then property which is not a promise resolves to undefined
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inversifyjs.