Open dbnapp opened 5 years ago
Try dts-gen@0.6.0
This still fails on 0.6.0, but with a different error:
$ dts-gen -m @private/package -d
Warning: Could not retrieve version/homepage information: HTTP Error 404: Not Found for http://registry.npmjs.org/@private/package
@private/package
is obviously a placeholder here, but represents a valid private scoped package that this project depends upon.
Did you find a solution to this? And is the problem related to it being private or it being scoped? Mine is both
Did you find a solution to this?
No; this wasn't on the critical path for the project I was working on, so I dropped it, and I no longer work at that company. Sorry!
Fails for me too. dts-gen: v0.6.0
➜ dts-gen -m @vizydrop/logger -o 20:22:49
Unexpected crash! Please log a bug with the commandline you specified.
/usr/local/lib/node_modules/dts-gen/bin/lib/run.js:125
throw e;
^
Error: ENOENT: no such file or directory, open '@vizydrop/logger.d.ts'
at Object.openSync (fs.js:476:3)
at Object.writeFileSync (fs.js:1467:35)
at Object.<anonymous> (/usr/local/lib/node_modules/dts-gen/bin/lib/run.js:107:12)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '@vizydrop/logger.d.ts'
}
@vizydrop/logger is a private module here
I got this error for a third party scoped package. If it helps anyone, a quick and dirty workaround was to:
@org/package
. It will show up under node_modules/@org/package
node_modules/@org/package
to node_modules/package
dts-gen -m package
.declare module @org/package
node_modules/package
folder which you no longer need.What I found works is, specify a directory with -d
and run the command. It's going to throw an error, but still generate the necessary files. You may have to do the same wrapping at step 4 above
I realize that
@types/storybook__react
exists, this problem is really about if I use private scoped packages.if I make a directory for
@storybook
in my project and run the command I getwhich is just a file called
react.d.ts
inside the@storybook
directory I created and has the following contentsit seems to have an error