question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migration to v2 gives directory path errors

See original GitHub issue

I upgraded to webpackv5 and the watchpack v2 is now giving incorrect filepaths.

My context is set to /Users/gita/code/experimental I put some output statements in DirectoryWatcher.js to see what is being set as the directoryPath and filePath The inital print statements show the following are first set for DirectoryWatcher and Watcher in the constructor

2020-12-10-15:58:07 1|worker-webpack  | directoryPath of DirectoryWatcher /Users/gita/code
2020-12-10-15:58:07 1|worker-webpack  | directoryPath of DirectoryWatcher /Users/gita
2020-12-10-15:58:07 1|worker-webpack  | directoryPath of DirectoryWatcher /Users
2020-12-10-15:58:07 1|worker-webpack  | filePath of Watcher /Users/gita
2020-12-10-15:58:07 1|worker-webpack  | filePath of Watcher /Users/gita/code
2020-12-10-15:58:07 1|worker-webpack  | filePath of Watcher /Users/gita/code/experimental

And then I get a whole bunch of errors stating ENOTDIR. These are just the first few …

2020-12-10-15:58:08 1|worker-webpack  | Watchpack Error (watcher): Error: ENOTDIR: not a directory, watch '/Users/gita/code/experimental/Users/gita/code'
2020-12-10-15:58:08 1|worker-webpack  | Watchpack Error (watcher): Error: ENOTDIR: not a directory, watch '/Users/gita/code/experimental/Users/gita/code/experimental'
2020-12-10-15:58:08 1|worker-webpack  | Watchpack Error (watcher): Error: ENOTDIR: not a directory, watch '/Users/gita/code/experimental/Users/gita/code/experimental/modules'

It looks like it is incorrectly nesting the base context directory? It it doubling over the base directory path. Any fix/hints?

Versions: webpack 5.10.0 watchpack 2.1.0

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Aghassicommented, Feb 4, 2021

To the above bug that I was seeing, @gregmagolan helped me track it down and we opened #188

1reaction
gita-vahdatiniacommented, Dec 22, 2020

When the initial directorypath and filepath are set up they are being initialized incorrectly I think, hence the double path that is created. If the filepath is already in directorypath it should begin from that one. Let me try and compare watchpack to the previous version to see what has changed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Migration Manager - Microsoft 365
This article describes how to resolve issues and errors you may experience when using Migration Manager for file share migration.
Read more >
Asp.Net Core migration path error - visual studio 2017
The add-migration command on the PMC works fine, but when I execute update-database it give me an error saying that it cannot open...
Read more >
Pulp2 to pulp3 migration fails on certain repos during "satellite ...
Pulp2 to pulp3 migration fails on certain repos during "satellite-maintain content prepare" step with FileNotFoundError: [Errno 2] No such file ...
Read more >
Data migration service error codes - Google Support
Events didn't migrate because the participant isn't an attendee or organizer of the event. To troubleshoot this issue: Check the ICS file from...
Read more >
Warnings with errors 0x00000035(network path was not found ...
5/9/2017 2:32:46 PM 4400 Warning: The Dell Migration Manager RUM Controller Service is not accessible. Error 0x000006BA. The RPC server is unavailable. ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found