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

199
Vistas
Disable Node REPL pre-evaluation?

In the Node (v16.7.0) REPL, Node tries to evaluate my statement before I've finished typing it. For example, if I type 2 + 2, it displays a faint 4 on the next line before I hit the Enter key. Is there a way to disable this behavior? For most cases, it's not a problem; but when I'm performing expensive operations, the REPL lags or freezes up as I'm trying to finish typing my statement. To be clear, the problem is not that the interpreter is printing the output; it's that it's trying to evaluate my statement before I finish typing it. Thanks in advance for your help!

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

0

The REPL library calls that a preview (search for preview in the link for more info). I'm not aware how to launch the default node REPL with command line options (or some other kind of configuration options) so that previews are not shown, but the REPL itself is a library you can use, with all the defaults (or whatever you prefer) and removing previews - for this check the REPL library options.

A basic example is creating this script:

#!/usr/bin/env node

const repl = require('repl');

repl.start({
  preview: false
});

Make sure you also have it as executable (in Linux/Mac from the command line it would be with chmod +x name-of-repl-script from the terminal), and well, run that script instead of node directly. Alternatively you can run the script with node name-of-repl-script (here, assuming node is the NodeJS REPL executable and that it's in the path).

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