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

Linux support? #4

Closed
schlichtanders opened this issue Oct 9, 2023 · 4 comments
Closed

Linux support? #4

schlichtanders opened this issue Oct 9, 2023 · 4 comments

Comments

@schlichtanders
Copy link

I getting error trying kubycat on my linux machine

TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
    at new NodeError (node:internal/errors:405:5)
    at Object.watch (node:fs:2416:11)
    at Kubycat.watchFiles (/home/myhome/.npm-packages/lib/node_modules/kubycat/dist/cjs/Kubycat.js:56:46)
    at Kubycat.<anonymous> (/home/myhome/.npm-packages/lib/node_modules/kubycat/dist/cjs/Kubycat.js:90:18)
    at Generator.next (<anonymous>)
    at /home/myhome/.npm-packages/lib/node_modules/kubycat/dist/cjs/Kubycat.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/myhome/.npm-packages/lib/node_modules/kubycat/dist/cjs/Kubycat.js:4:12)
    at Kubycat.start (/home/myhome/.npm-packages/lib/node_modules/kubycat/dist/cjs/Kubycat.js:89:16)
    at KubycatCli.main (/home/myhome/.npm-packages/lib/node_modules/kubycat/dist/cjs/KubycatCli.js:39:17) {
  code: 'ERR_FEATURE_UNAVAILABLE_ON_PLATFORM'
}

Node.js v18.17.1

the error brought me to this stackoverflow which says that the recursive option seems unsupported on linux.

What to do? Is this just not working linux?

@schlichtanders
Copy link
Author

schlichtanders commented Oct 9, 2023

Just found that not too much ago, the linux recursive features seems to have been added
nodejs/node#45098

EDIT: Looking at the key commit nodejs/node@17ae2ab it gets apparent that you need a nodejs version >= 20.0.0 for this feature to be there. I will try to get a newer nodejs version

@sheldonjuncker
Copy link
Owner

Thanks for finding that! I'll add in a note about Node.js version requirements, but I also found that chokidar or node-watch might be alternatives to fs.watch that don't have this limitation on Linux. If chokidar is really as easy to work with as people have said, I can switch to that too.

@schlichtanders
Copy link
Author

Indeed it works after updating nodejs to use a 20.x version! 🥳

@schlichtanders
Copy link
Author

schlichtanders commented Oct 10, 2023

I see no reason to switch to chokidar - it is not super maintained, better stay with using fs.watch as it works since node 20.x 👍

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

No branches or pull requests

2 participants