Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

169
Views
i am building a project on online file explorer, whenever i try to launch app to local host its says "du command not recognised"
const {execSync} = require('child_process');

try{
    const result = execSync(`du -sh "\Users\hites\Downloads\1.1 Node Project1 - File Explorer.zip (1)\Node Project1 - File Explorer"`).toString();
    console.log(result);
}catch(err){
    console.log(`Error: ${err}`);

output:::

'du' is not recognized as an internal or external command,
operable program or batch file.
node:child_process:903
    throw err;
    ^

Error: Command failed: du -sh "C:\Users\hites\Downloads\1.1 Node Project1 - File Explorer.zip (1)\Node Project1 - File Explorer\static\code"
'du' is not recognized as an internal or external command,
operable program or batch file.

    at checkExecSyncError (node:child_process:826:11)
    at execSync (node:child_process:900:15)
    at calculateSizeD (C:\Users\hites\Downloads\1.1 Node Project1 - File Explorer.zip (1)\Node Project1 - File Explorer\lib\calculateSizeD.js:8:27)
    at C:\Users\hites\Downloads\1.1 Node Project1 - File Explorer.zip (1)\Node Project1 - File Explorer\lib\mainContent.js:55:57
    at Array.forEach (<anonymous>)
    at buildMainContent (C:\Users\hites\Downloads\1.1 Node Project1 - File Explorer.zip (1)\Node Project1 - File Explorer\lib\mainContent.js:31:11)
    at Server.respond (C:\Users\hites\Downloads\1.1 Node Project1 - File Explorer.zip (1)\Node Project1 - File Explorer\lib\respond.js:72:29)
    at Server.emit (node:events:390:28)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

To get this running, you can simply run that in wsl (Windows Subsystem for Linux) assuming you have that installed and assuming that the version of wsl/linux you use with that has du. Worked for me. You would have to revise your path so you're using /mnt/c/... instead of C:\...

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!