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

263
Views
Error in file Handling in NodeJS : 'MODULE_NOT_FOUND'
//load the module
let fs = require("fs");
let message = "Welcome to simple file handling program using Node JS";
fs.writeFile("demo1.txt",message,(err) =>{
    if(!err){
        console.log("Information stored in file successfully");
    }
    else{
        console.log(err);
    }
});

I am getting the following error in the above Node JS program:

C:\Users\Dell\OneDrive\Documents\Phase - 3\Node JS Programs\Fs Module Programs>node AsyncWriteOperations.js node:internal/modules/cjs/loader:936 throw err; ^

Error: Cannot find module 'C:\Users\Dell\OneDrive\Documents\Phase - 3\Node JS Programs\Fs Module Programs\AsyncWriteOperations.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
about 4 years ago · Juan Pablo Isaza
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!