question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

does reflect-metadata work

See original GitHub issue

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!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
garronejcommented, May 31, 2020

Until then I re-open the issue

1reaction
garronejcommented, Jun 1, 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 https://github.com/denoland/deno/pull/2746 I will tell you when I sorted that out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is reflect-metadata in typescript - Stack Overflow
reflect-metadata Allows you to do runtime reflection on types. The native (non reflect-metadata) version of type inference is much poorer ...
Read more >
Introduction to “reflect-metadata” package and its ECMAScript ...
The Reflect.defineMetadata method lets you add a custom metadata value metadataValue which could be any JavaScript value to the target object ( ...
Read more >
Why reflect-metadata suc*s - DEV Community ‍ ‍
The reflect-metadata library enables us to write decorators that will read metadata from the static type and this metadata may affect your ...
Read more >
reflect-metadata - npm
The Reflect object will expose the MOP operations to allow imperative access to metadata. Metadata defined on class declaration C is stored in...
Read more >
Using the Reflection and Reflection Metadata APIs with ...
Metadata in this case means the data describing the structure or data types of JavaScript objects. Using this API we can also store...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found