Ability to configure watcher. EACCES issue
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 474
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 53
Description
Describe the bug
By default, netlify watches the entire project directory. Not only this inefficient, but it also blocks start of the server is any of the files in this directory has different permissions.
I have the following in my vite config:
export default defineConfig({
server: {
watch: {
ignored: ["**/supabase/**"],
},
},
});
Probably the same watch ignore option should be added to netlify.toml, but I couldn't find any.
What's the workaround?
Steps to reproduce
- touch test
- sudo chown root ./test
- netlify dev
Configuration
No response
Environment
System:
OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 22.92 GB / 31.00 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 18.13.0 - /usr/bin/node
Yarn: 1.21.1 - /usr/bin/yarn
npm: 8.19.3 - /usr/bin/npm
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how netlify dev configures its file watcher and compare that with the server.watch.ignored example in the Vite configuration. Review the documented netlify.toml configuration surface; done means users can exclude directories such as supabase so inaccessible files do not prevent the server from starting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100