Skip to content
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

Errors and crashes on 3.0.0 and 3.0.2 for Windows 10 #871

Closed
pgamelin opened this issue Jul 18, 2019 · 7 comments
Closed

Errors and crashes on 3.0.0 and 3.0.2 for Windows 10 #871

pgamelin opened this issue Jul 18, 2019 · 7 comments
Labels

Comments

@pgamelin
Copy link

pgamelin commented Jul 18, 2019

Describe the bug
3.0.0 uses the last version of readdirp (3.1.1) and causes crash on Windows 10 only
3.0.2 also uses the last version of readdirp and cause another crash

3.0.0 error

(node:14504)  UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 591)
(node:14504) UnhandledPromiseRejectionWarning: TypeError: Cannot mix BigInt and other types, use explicit conversions
    at FSWatcher._hasReadPermissions (xxx\node_modules\chokidar\index.js:755:36)
    at ReaddirpStream.filterPath [as _fileFilter] (xxx\node_modules\chokidar\index.js:680:12)
    at ReaddirpStream._isFileAndMatchesFilter (xxx\node_modules\chokidar\node_modules\readdirp\index.js:234:31)
    at ReaddirpStream._exploreDirectory (xxx\node_modules\chokidar\node_modules\readdirp\index.js:163:23)
    at ReaddirpStream._read (xxx\node_modules\chokidar\node_modules\readdirp\index.js:122:7)
(node:14504) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 592)

3.0.2 error

(node:2772) UnhandledPromiseRejectionWarning: TypeError: Expected pattern to be a non-empty string
    at picomatch (xxx\node_modules\picomatch\lib\picomatch.js:43:11)
    at createPattern (xxx\node_modules\chokidar\node_modules\anymatch\index.js:25:18)
    at Array.map (<anonymous>)
    at anymatch (xxx\node_modules\chokidar\node_modules\anymatch\index.js:77:28)
    at xxx\node_modules\chokidar\index.js:214:51
    at Array.every (<anonymous>)
    at xxx\node_modules\chokidar\index.js:212:22
    at Array.some (<anonymous>)
    at WatchHelper.filterDir (xxx\node_modules\chokidar\index.js:211:43)
    at ReaddirpStream.directoryFilter [as _directoryFilter] (xxx\node_modules\chokidar\lib\nodefs-handler.js:405:34)

(node:2772) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2772) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Versions (please complete the following information):

  • Chokidar version 3.0.0 / 3.0.2
  • Node version 12.6.0
  • OS version: Only Windows 10 (MacOs is fine)

To Reproduce
Steps to reproduce the behavior.

chokidar.watch('xxxx');

@ceharsh24
Copy link

Hey, I had the same issue. I downgraded chokidar to version v2.1.5 and it worked for me.

@lordaplala
Copy link

I have the same problem : /

@wking-io
Copy link

wking-io commented Aug 9, 2019

I am having the same problem

@paulmillr
Copy link
Owner

It would be great if someone could help me debug this issue. Specifically, set up console.log before this line: node_modules\picomatch\lib\picomatch.js:43. We need to understand which value is getting passed there.

@lordaplala
Copy link

I may have found out where the 3.0.2 error (Expected pattern to be a non-empty string) comes from.

This gives the error :

chokidar.watch('./package.json', { recursive: true, usePolling: true, alwaysStat: true })

This solves it :

chokidar.watch('package.json', { recursive: true, usePolling: true, alwaysStat: true })

Hope it could help @paulmillr

@rekmarks
Copy link

rekmarks commented Sep 17, 2019

I just encountered the same error on the latest macOS Mojave:

UnhandledPromiseRejectionWarning: TypeError: Expected pattern to be a non-empty string
  at picomatch (xxx\node_modules\picomatch\lib\picomatch.js:43:11)

It occurred when I attempted to watch the current working directory by calling chokidar.add('./'). Changing the call to chokidar.add('.') resolved the issue.

@paulmillr
Copy link
Owner

Fixed! You can try by npm install github:paulmillr/chokidar, or wait 3.1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants