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

[RFC]: Setting for ignoring a folder in chokidar #8752

Closed
1 task done
hacknaked opened this issue Jun 27, 2023 · 2 comments
Closed
1 task done

[RFC]: Setting for ignoring a folder in chokidar #8752

hacknaked opened this issue Jun 27, 2023 · 2 comments

Comments

@hacknaked
Copy link

hacknaked commented Jun 27, 2023

Summary

Add a configuration setting to instruct chokidar ignore a folder in the root project.

Motivation

Working with RedwoodJS and Docker in a local environment, I run a Docker container with an external service and mounted a volume "data" for container persistence.

This folder is scanned by chokidar and fails with EACCESS (given that Docker set root permissions on that folder)

Error: EACCES: permission denied, watch '..../git/proj/data/bitcoind/testnet3/blocks'
gen |     at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
gen |     at Object.watch (node:fs:2343:34)
gen |     at createFsWatchInstance (....../node_modules/chokidar/lib/nodefs-handler.js:119:15

There are other use cases when would be nice to add folders in the Redwood root project and prevent chokidar to scan them (3rd party tools, infrastructure folders, etc.)

Detailed proposal

  1. Adding a [chokidar] section in redwood.toml is probably enough.
  2. Other option (simpler) would be to hardcode the setting when creating the chokidar instance (for example: "ignore all folders that begins with a dot like .data")

Are you interested in working on this?

  • I'm interested in working on this
@Tobbe Tobbe changed the title [RFC]: Setting for ignoring a forder in chokidar [RFC]: Setting for ignoring a folder in chokidar Jun 27, 2023
@Tobbe
Copy link
Member

Tobbe commented Jun 27, 2023

This comment on another issue is also in favor of this feature: #5403 (comment)

@hacknaked Is your issue a duplicate of this? #7761

@hacknaked
Copy link
Author

Seems to be the same feature request! Sorry for the noise, closing this one in favor of #7761.

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