Skip to content
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

does reflect-metadata work #4

Open
ovesco opened this issue May 30, 2020 · 6 comments
Open

does reflect-metadata work #4

ovesco opened this issue May 30, 2020 · 6 comments

Comments

@ovesco
Copy link

ovesco commented May 30, 2020

Hey nice project!
Just tried to use it with one of my own: https://github.com/ovesco/diosaur
But it fails miserably with the following error:

C:\Users\Guillaume Hochet\Desktop\jshare\ddi\node_modules\denoify\bin\denoify.js:6
process.once("unhandledRejection", error => { throw error; });
                                              ^

TypeError [ERR_INVALID_ARG_TYPE]: The "to" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:113:11)
    at Object.relative (path.js:438:5)
    at Object.isInsideOrIsDir (C:\Users\Guillaume Hochet\Desktop\jshare\ddi\node_modules\denoify\tools\isInsideOrIsDir.js:7:27)
    at Object.denoify (C:\Users\Guillaume Hochet\Desktop\jshare\ddi\node_modules\denoify\lib\denoify.js:29:28)
    at Object.<anonymous> (C:\Users\Guillaume Hochet\Desktop\jshare\ddi\node_modules\denoify\bin\denoify.js:15:11)
    at Module._compile (internal/modules/cjs/loader.js:1121:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1160:10)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:67:12) {
  code: 'ERR_INVALID_ARG_TYPE'
}

I believe it might be related to the use of reflect-metadata but didn't find any note about this in the readme, is it supported? Asking because I'm not sure if I should consider it a package to denoify before

Thanks!

@garronej
Copy link
Owner

Hey,
Hold on let me have a look :octocat:

@garronej
Copy link
Owner

@ovesco Sorry the error message is not very meaningful I have to improve that.
Denoify needs a main field in the package.json.
Check out my PR for diosaur, everything should be working, come back to me if it is not the case.

Keep up the good work 👍

garronej added a commit that referenced this issue May 30, 2020
@ovesco
Copy link
Author

ovesco commented May 31, 2020

Oh my bad quite ashamed then ahah, Thanks for the help ! You might also want to add a special note about reflection in denoify to say it is supported if the library depends on it :)

And Thanks for your work thats a very nice package and a very good idea !

@ovesco ovesco closed this as completed May 31, 2020
@garronej
Copy link
Owner

garronej commented May 31, 2020

Thank you for the kind words,

Regarding reflect-metadata, it is not supported out of the box, I had to add a denoPorts entry in your package.json, I won't add it in the know-port.json yet because it does not import the types definitions so it forces you to use ts-ignore. I have to investigate how to get the types supported with denoland/deno#2746
I will tell you when I sorted that out.

@garronej garronej reopened this May 31, 2020
@garronej
Copy link
Owner

Until then I re-open the issue

@garronej
Copy link
Owner

garronej commented Jun 1, 2020

For future reference: ovesco/diosaur#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants