-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReferenceError: 1 argument required, but only 0 present #27
Comments
Here is link to cloud example: sandbox |
this happens to me too with tsx. it works fine with ts-node. node v21.1.0
|
Maybe i am too stupid to setup everything correctly.. but for me only last example works: Here is working example: If someone has an example of how can i build it and run built version it would be nice to have a look at it, ty. |
btw, does someone use this lib in production? is this project still alive at all? |
we use it in production ( we compile when we run, so not running into this problem) that said, we are actively considering alternatives, since the project seems somewhat dead lol |
This lib seems like a true gem, but lack of live, working sandbox examples for everything listed in readme makes it little bit hard to understand how to work with it. Its just insane how projects like this fade out when projects like microsoft TSyringe has 350k weekly downloads… Hope author will continue with this project) |
Hi. I followed you docs, but anyway keep getting this exception:
ReferenceError: 1 argument required, but only 0 present. Note: You must use DI-Compiler (https://github.com/wessberg/di-compiler) for this library to work correctly. Please consult the readme for instructions on how to install and configure it for your project.
Here is my little test project setup:
package.json
tsconfig.json
di.ts
index.ts
Note
If i run
node --loader @wessberg/di-compiler/loader --loader tsx di.ts
- everything works as expectedBut, if i try to use container from another file, i get that exception:
node --loader @wessberg/di-compiler/loader --loader tsx index.ts
Is this issue on your side or something wrong with my configs? Ty for help!
p.s. I am sure this tool is absolutely underrated, and i think this is partly due to problems with setting it up to be working , to play with it and make some tests.
p.s.2. I hope it is still maintained)
The text was updated successfully, but these errors were encountered: