GeezerVison is showing github.com — fix: ignore the error that directoryPath is not a directory by liximomo · Pull Request #226 · webpack/watchpack
Conversation
liximomo
commented
Dec 12, 2022
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
The error is caused by a specific alias config of webpack, considering the following example:
// webpack.config.js
module.exports = {
resolve: {
alias: {
"@/foo": ["src/foo/index", "src/foo"]
}
}
}
With the above config, we will get a DirectoryWatcher watching src/foo/index. If you happen to have a src/foo file on your filesystem, you will see the error:
Watchpack Error (initial scan): Error: ENOTDIR: not a directory, scandir '/Users/xx/demo/src/foo'
We could safely ignore the error of ENOTDIR in whatever cases.
Related Issues:
nuxt/bridge#226
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
AlexeyKosov reacted with thumbs up emoji
|

The committers listed above are authorized under a signed CLA.
- ✅ login: liximomo / name: X.L (fe84a8b)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
codecov
Bot
commented
Dec 12, 2022
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.11%. Comparing base (dc690bb) to head (9ccfcf3).
⚠️ Report is 110 commits behind head on main.
❗ There is a different number of reports uploaded between BASE (dc690bb) and HEAD (9ccfcf3). Click for more details.
HEAD has 5 uploads less than BASE
Additional details and impacted files
@@ Coverage Diff @@
## main #226 +/- ##
===========================================
- Coverage 92.12% 78.11% -14.01%
===========================================
Files 6 6
Lines 1041 1042 +1
Branches 249 250 +1
===========================================
- Hits 959 814 -145
- Misses 82 228 +146
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks for the report and the analysis! Closing in favor of #360.
Hiding the ENOTDIR log was only half of the problem: with src/foo a file, nothing watched for it to become a directory, so a later src/foo/index.js was not reported. #360 treats ENOTDIR like a missing directory instead, so the error goes away and the file is reported once src/foo is a directory. It has a test for both.
Generated by Claude Code
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.