-
-
Notifications
You must be signed in to change notification settings - Fork 246
Could not find a declaration file for module 'webpack' / 'tapable' #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Oh that's a shame. If you'd like to reattempt #281 (I'm not sure how this regressed) I'll certainly take a look at it 🥰 |
In #287 I had moved everything depending on webpack/tapable out to hooks.d.ts in the hopes that only index.d.ts would be included automatically and the rest just where used. We should definitely not add @types/webpack as a dependency, as as I remember that would re-introduce @types/node as a dependency. Maybe just move the declaration export declare type ForkTsCheckerHooks = 'serviceBeforeStart' | 'cancel' | 'serviceStartError' | 'waiting' | 'serviceStart' | 'receive' | 'serviceOutOfMemory' | 'emit' | 'done'; to the index.d.ts, reference it from hooks.ts and make sure hooks.d.ts is removed on build, as it won't contain any more external references? |
Not sure about how your typings generation works. If @phryneas already have an idea on it, I'll be happy to check if it works. I think microsoft/TypeScript#18588 is somewhat related and there could be some workarounds. Still, no official solution |
hi @phryneas do you have a PR for this that I may not find? Because you mentioned here #342 (comment) that you are working on it - if not is your suggestion solution the way to go? |
@akleiber Argh, I had experimented using API-extractor for that, hit a roadblock, got distracted and forgot about that. Sorry! |
Fixes E2E test to ensure that the package typings can be consumed without need to install external packages except `@types/webpack`. Solves: #339
Fixes E2E test to ensure that the package typings can be consumed without need to install external packages except `@types/webpack`. ✅ Solves: #339
Fix released in the 5.0.0-alpha.7 version :) |
Current behavior
Expected behavior
No errors by default, or a
peerDependencies
warning fired off, or a disclaimer in setup section of the README.Steps to reproduce the issue
Not really sure, I just updated
fork-ts-checker-webpack-plugin
to1.5.0
from0.5.2
and the error popped up.The error doesn't show up in
1.3.1
because of the typings dependencies being added, then removed again in1.3.2
.The problematic declaration seems to be into
lib/hooks.d.ts
, wherewebpack
andtapable
are types are imported.Manually adding the dependencies fix the errors.
Related:
Environment
The text was updated successfully, but these errors were encountered: