const fs = require('fs') mvdir const = The require ( 'mvdir' ); // // public library file address the let sourcePath = './../store' ; // // you need to copy the location to let destPath = './src/store' ; fs.exists(destPath, function(exists) { the console.log ( 'car is very stable' ) IF (! EXISTS) { console.log ( 'I went to a public copy of the file' ) mvdir(sourcePath, destPath, { copy: true }); }else{ console.log ( 'file is already in the public, do not panic' ) }; });