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

112
Views
fs.copyFileSync no hace nada

Estoy usando Node.js para copiar algunos archivos para uno de mis paquetes. Mi OS es Windows 10 Pro . Cuando ejecuto el archivo JS (probado en cmd , powershell y cmd con admin) no pasa absolutamente nada. Sin error, sin copia. Aquí está el código:

 #! /usr/bin/env node let fs = require("fs"); let path = require("path"); let rootPath = path.join(__dirname, ".."); let root = fs.readdirSync(rootPath); let exclude = [ ".git", ".gitignore", ".prettierrc", "bin", "node_modules", "dist", ]; root = root.filter((item) => exclude.indexOf(item) === -1); let rootFiles = root.filter((item) => fs.statSync(path.join(__dirname, "..", item)).isFile() ); let rootFolders = root.filter((item) => fs.statSync(path.join(__dirname, "..", item)).isDirectory() ); for (let file of rootFiles) { let filePath = path.join(rootPath, file); let destinationPath = path.join(process.cwd(), file); if (!fs.existsSync(filePath)) { fs.copyFileSync(filePath, destinationPath); } } process.exit(0);
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!