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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong Project Root Directory in watch mode #7145
Comments
This issue seems to persist on Parcel@2.0.0 and Windows, and it also breaks the logic to find |
I believe I am having the same issue on Windows. In my case, Parcel seems to be picking up the Edit: this seems to occur when I do not pass entries to the build command, and instead rely on the This explains why I was not seeing a I also experienced what was already mentioned: Parcel watching more files than necessary, thus hanging when I hit |
This was fixed by #7537 |
馃悰 bug report
Configuring targets in package.json and running
parcel watch
leads to wrong project root directory - as result the file watcher pointed to the system root (or any parent root with package.json) and watching all the possible files (which makes initial and future timeouts and limits to system file watchers).馃帥 Configuration (.babelrc, package.json, cli command)
馃 Expected Behavior
Correct project root dir, and fast
parcel watch
馃槸 Current Behavior
Huge(8-10 seconds) timeouts when starting
parcel watch
and wrong project root dir馃拋 Possible Solution
I had to debug parcel, and the problem is quite simple - when running
parcel watch
it uses current working directory as an entry point, and since current directory path doesn't contain trailing slash it is ignored when trying to find project root directory (it walks only through the parents looking for package-lock.json), then wrong project root directory is used to listen to system file changes.*tried to run
parcel watch $PWD/
but still no luck, because entry point is resolved(by path) and trailing slash removed, which leads to the same bug馃實 Your Environment
Node@16.9, Ubuntu 20.4, Parcel@2.0.0-rc.0
The text was updated successfully, but these errors were encountered: