Closed acopalipsis closed 8 years ago
Hi @acopalipsis can you please use the issue template it helps us to support users like you.
We need to know what version of node.js you are using and most important which version of InversifyJS you are using.
In version 1.x the decorator was called Inject
in version 2.x it is called inject
. Also in version 1.x the methods getAll
and get
from kernel are not defined.
So it looks to me like you are using 1.x with the documents of 2.x. Please try to install the alpha release:
$ npm install inversify@2.0.0-alpha.3
We have a page that details How to upgrade from 1.x to 2.x.
I have updated the docs to display:
$ npm install inversify@2.0.0-alpha.3 --save
instead of:
$ npm install inversify --save
This should help others don't encounter the same problem. Please let us know if this solved your problem.
Thanks for help. Even had to abandon the Declaration established through tsd.
No problem. We don't use tsd because it is deprecated. Right now we are in inversify@2.0.0-alpha.3
but once we go into a production ready release (inversify@2.0.0
) we will send the type definitions to typings so it will be possible to do:
$ typings install inversify --save
But this is not possible right now.
Am I the only one who tried to launch this DI? Why in all examples import inject, while in js code there is only Inject?
why?
this DI is still not done?