Open mnpenner opened 7 years ago
Hi, any update on this?
I'm also facing similar issue while trying to generate .d.ts
files
I'm in the same boat. Any suggestions on what might be going wrong? (If it's caused by a specific line in the .js file, a line number would be great...)
and your solution guys was ?
@DavidNorena It's likely that there are relative path require()
statements in expression-file, and would not be correctly resolved.
Just transform to absolute path to do the tricks, for example:
$ dts-gen -e "require('./dist/umd/emoutils.js')"
Couldn't load module "undefined". Please install it globally (npm install -g undefined) and try again.
# Change to Absolute Path
$ dts-gen -e "require('/absolute-path-to/emoutils.js')"
Wrote 52 lines to dts_gen_expr.d.ts.
Or dive into source and specify a correct cwd
to fix this issue.
I also encountered this issue. My issue was also with unresolved dependencies. I had not run npm install on the repo I was trying to run dts-gen on. After I did so, the issue resolved.
I'm trying
But I get
Which doesn't make much sense.
How can I generate a
.d.ts
file for my library without having to globally install it first?