Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

490
Vistas
npm 'sass' package compile empty file in watch mode

I use the npm sass library to compile my ".scss" file and it works really well without any problem but in watch mode, after some file save it starts to produce an empty file. I restart the app and it compiles successfully again. my watch file is at this link: sass builder file I don't know if this is my watcher problem or sass problem or even windows file system problem. can anyone check to help me to fix this problem?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I try many ways to fix this issue and I found the problem is the Windows file system. in the windows file system if I save a file for a short moment depend on your system performance the file get empty and refill again so to fix this issue I add the setTimeout function in watch mode about 500ms so when user save scss file and we detect change first we wait 500ms then execute build function.

//before
 if (fileName && event == "change") {
   this.buildSassFile(fileConfig);            
 }
//after
 if (fileName && event == "change") {
   setTimeout(()=>{
     this.buildSassFile(fileConfig);
   },300);
                
 }
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda