Path "stream" cannot be resolved
Cool project, but:
Path "stream" cannot be resolved
I installed @types/node but it doesn't seem to detect it? I am confused.
~~After some investigation, I cannot find any part of the code (at least for module resolver) that supports loading a d.ts file. Maybe the docs is misleading me?~~
EDIT: I was VERY wrong and don't know what I was saying. sorry for that
this is how you do it https://github.com/JSMonk/hegel/blob/master/packages/cli/.hegelrc#L7-L9
@thecotne the problem is that is the wrong folder to search for. the structure of the folder is @types > (module name) > (name from package.json).d.ts. This means that require.resolve is unable to find it because the path is hard coded here, not to mention that the config specified by typings might not actually go through here which is required to get typings from the node module.
I suggest that the user typings and node_modules be handled seperately. the code is kind of confusing to get around
@takase1121, we still work for full support of Node.js native modules, so, I will check the stream module today and will notify you about changes as soon as possible :)
No worries, if you ever need help, I can try my best to help. I am currently testing some code to support DefinitelyTyped, if it works I'll consider opening a PR.
hi! i have a repo with flow types that i tried using hegel on.
i'm getting a similar error:
$ npx hegel
Path "net" cannot be resolved
maybe there is a common solution, but i could create a separate issue, if needed. thanks!