Error: ENOTDIR: not a directory, scandir
See original GitHub issueI am not sure where the issue lies, but I am using watch to watch for file changes on my js file, and when a change happens it should minifiy the js file. This works on my Ubuntu machine, but on my Windows machine, I get the error below.
> watch.cmd --interval=1 uglifyjs.cmd -c -m -o ./public/assets/js/prefab.min.js -- ./public/assets/js/prefab.js
> Watching ./public/assets/js/prefab.js
C:\Users\rnaddy\AppData\Roaming\npm\node_modules\watch\main.js:73
if (err) throw err;
^
Error: ENOTDIR: not a directory, scandir 'C:\Users\rnaddy\Documents\vscode\projects\prefab\public\assets\js\prefab.js'
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
0 - Stack Overflow
Error : ENOTDIR: not a directory, scandir './commands/setWelcome.js' · Ask Question. Asked 1 year, 1 month ago. Modified 1 year, 1 month ago....
Read more >ENOTDIR: not a directory, scandir ' .. /app/code/.DS_Store ...
Then I try to run baler in my root Magento project it stuck with such error: Error: ENOTDIR: not a directory, scandir '...
Read more >ENOTDIR: not a directory Error - The freeCodeCamp Forum
hey there, I'm brand new to coding and I'm just trying to view my page and I keep getting this message in VSCode2...
Read more >Search - appsloveworld
Coding example for the question Error: ENOTDIR: not a directory, scandir './commands/setWelcome.js'-discord.js.
Read more >Bitbutcket sls deploy Error: ENOTDIR: not a directory, scandir
Bitbutcket sls deploy Error: ENOTDIR: not a directory, scandir · Hi, I need help with this error in bitbucket pipeline: · Operating System:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mikeal I wonder how difficult it would be difficult to allow watching a file? I’m willing to help with this 👍
I think this comes from the fact that you’re trying to watch a file and that this tool can only watch directories. I ran into the same problem 😝
That being said, I was able to get around it by building a custom filter and then just checking for the file I want. It was relatively painless https://github.com/mikeal/watch#watchcreatemonitorroot-options-callback