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

Error: UNKNOWN: unknown error, lstat '\\nasserver\BİRİM\ExampleFile.docx #891

Closed
hakirac opened this issue Sep 30, 2019 · 6 comments
Closed
Labels

Comments

@hakirac
Copy link

hakirac commented Sep 30, 2019

[30/09/2019 15:59:18.345] [ERROR] Error: UNKNOWN: unknown error, lstat '\nasserver\xxx\BİRİM\ExampleFile.docx'

at FSWatcher.watcher1.on.on.on.on.error (C:\node\projeler\devs\Library\gozcu\chokidar.js:407:39)
at FSWatcher.emit (events.js:198:13)
at FSWatcher._handleError (C:\node\projeler\devs\node_modules\chokidar\index.js:589:10)
at ReaddirpStream.NodeFsHandler._boundHandleError (C:\node\projeler\devs\node_modules\chokidar\lib\nodefs-handler.js:251:43)
at ReaddirpStream.emit (events.js:198:13)
at ReaddirpStream._handleFatalError (C:\node\projeler\devs\node_modules\readdirp\index.js:274:10)
at ReaddirpStream._formatEntry (C:\node\projeler\devs\node_modules\readdirp\index.js:196:16)

It gives this error when I delete a file. However, it does not follow up when the file is added or changed. Reason Capital letter " İ ". " BİRİM ". Because of Turkish İ. I dont know, what can i do but i think that it is a bug for chokidar.

Versions

  • Chokidar version 3.1.1
  • Node version 10.16.3
  • OS version: Windows 10
@paulmillr
Copy link
Owner

I need your chokidar config

@hakirac
Copy link
Author

hakirac commented Sep 30, 2019

`

  const watcher1 = chokidar.watch("\\\\nasserver\\xxx\\",
      {
        ignoreInitial: true, 
        disableGlobbing: false, 
        followSymlinks: false, 
        usePolling: false,
        ignored: /(^|[\/\\])\..|.DS_Store$|~\$|kopya.docx$|kopya.jpeg$|kopya.jpg$|.tmp$|thumbs.db$/i,
        persistent: true,
        alwaysStat: false,
        interval:10000,
        binaryInterval: 10000
      })

Thanks for answer.
I tried everything but it goes not. :(

@paulmillr
Copy link
Owner

why don't you handle this with .on('error', (error)?

@hakirac
Copy link
Author

hakirac commented Oct 1, 2019

image

I am using error function of chokidar .

@paulmillr
Copy link
Owner

Merging to #895

@hakirac
Copy link
Author

hakirac commented Oct 16, 2019

Problem resolved. It is UTF-8 problem. And Chokidar 3.1.1 is okey but 3.2.2 is not working...

Append folgende code start of file "https://github.com/paulmillr/chokidar/blob/master/index.js"

 String.prototype.toLowerCase = function () {
  var string = this;
  var letters = { "İ": "i", "I": "ı", "Ş": "ş", "Ğ": "ğ", "Ü": "ü", "Ö": "ö", "Ç": "ç" };
  string = string.replace(/(([İIŞĞÜÇÖ]))/g, function (letter) { return letters[letter]; })
  return string;
}

String.prototype.toUpperCase = function () {
  var string = this;
  var letters = { "i": "İ", "ş": "Ş", "ğ": "Ğ", "ü": "Ü", "ö": "Ö", "ç": "Ç", "ı": "I" };
  string = string.replace(/(([iışğüçö]))/g, function (letter) { return letters[letter]; })
  return string;
}

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

2 participants