-
-
Notifications
You must be signed in to change notification settings - Fork 582
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
Incompatibility of types with recent changes in @types/node
#1299
Incompatibility of types with recent changes in @types/node
#1299
Comments
There is a possible quick fix - change this line Line 9 in 5589454
to export class FSWatcher extends EventEmitter implements Omit<fs.FSWatcher, 'ref' | 'unref'> { Or define these missed methods. |
so why was it fine before? maybe it’s not ours issue? |
I don't have enough context unfortunately, but at first glance it looks like:
|
|
For those that may come here later... when working with Capacitor their @capacitor-community/electron module (which sets up electron for Capacitor) the 'npm run build' will fail for capacitor as it uses chokidar in setup.ts. You have been warned :) Work around until this is resolved is 'npm install @types/node@16.18.71' within your electron directory. |
same issue when working with |
I wasn't successful with the Instead for now I'm going with this solution. Something looks off so I'm not sure enough to make a PR on this repo, but at least it unblocks me export class FSWatcher extends EventEmitter implements fs.FSWatcher {
ref(): never;
unref(): never;
} |
update fs.FSWatcher types to satisfy nodejs versions >= 16; fixes #1299
published 3.6.0 |
Updates to `chokidar@3.6.0` which resolves paulmillr/chokidar#1299
Updates to `chokidar@3.6.0` which resolves paulmillr/chokidar#1299
Updates to `chokidar@3.6.0` which resolves paulmillr/chokidar#1299
Versions (please complete the following information):
To Reproduce:
@types/node
in this repository to e.g. latest Node v16 types: 16.18.75types/index.d.ts
is not properly extendingfs.FSWatcher
Expected behavior
Chokidar types should work with most recent versions of
@types/node
. TypeScript projects will face similar errors when building withskipLibCheck: false
(which is the default)Additional context
Change in
@types/node
that made this breaking change (to match Node versions) in a SemVer patch: DefinitelyTyped/DefinitelyTyped#68300The text was updated successfully, but these errors were encountered: