-
-
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
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
![image](https://private-user-images.githubusercontent.com/43147143/268440851-3f324015-8a98-4509-aff5-0ff7ea8a7f95.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkwMTY0OTksIm5iZiI6MTcxOTAxNjE5OSwicGF0aCI6Ii80MzE0NzE0My8yNjg0NDA4NTEtM2YzMjQwMTUtOGE5OC00NTA5LWFmZjUtMGZmN2VhOGE3Zjk1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIyVDAwMjk1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI3MmNjZjdjOTFlNjkyNmI4MjUyOGMwNThhZmZiN2Q4MDNlZGY1ZWViZmQxZGIzN2JhNmY0YTZiMzQyZjc1ODYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.slk7qKRd6aoXcxMVRIEgNM6Z4vfMFj9hrUhn1pun9hg)
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: