Can't generate files for scoped packages
See original GitHub issueI realize that @types/storybook__react exists, this problem is really about if I use private scoped packages.
npx dts-gen -m @storybook/react
Unexpected crash! Please log a bug with the commandline you specified.
ENOENT: no such file or directory, open '@storybook/react.d.ts'
if I make a directory for @storybook in my project and run the command I get
npx dts-gen -m @storybook/react
Wrote 3 lines to @storybook/react.d.ts.
which is just a file called react.d.ts inside the @storybook directory I created and has the following contents
/** Declaration file generated by dts-gen */
export = @storybook/react;
it seems to have an error
Issue Analytics
- State:
- Created 5 years ago
- Reactions:24
- Comments:7
Top Results From Across the Web
Can not find local declaration file for scoped packages #23999
My testing seems to show that a local declaration file for a non-scoped package is found, but that one for a scoped package...
Read more >Creating and publishing scoped public packages - npm Docs
To share your code publicly in a user or organization namespace, you can publish public user-scoped or organization-scoped packages to the npm registry....
Read more >Can not install npm scoped package - Stack Overflow
My project uses private registry packages along with common packages. I setup my scope registry according to docs at ...
Read more >Setting up a TypeScript multi-package mono-repo for ...
How to use NPM workspaces for scoped packages. ... For each package we create an index.ts file. // contents of ./packages/is-even/index.ts ...
Read more >Scoped registry in package.json not working - Unity Forum
Attached Files: ... It will generate the mantifest.json like below, ... If a registry is scoped within the package.json, you shouldn't have ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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 undernode_modules/@org/packagenode_modules/@org/packagetonode_modules/packagedts-gen -m package.declare module @org/packagenode_modules/packagefolder which you no longer need.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!