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

296
Vistas
I'm facing an error while trying to compile the code. Where am I going wrong and How do I fix it?

I'm getting the an error on terminal while trying to compile the code, but I don't understand why.

Code:

const express = require("express");

const app = express();

console.dir(app);

Error:

[1]: https://i.stack.imgur.com/mncsl.png

package.json:

{
  "name": "firstapp",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "express": "^4.18.1",
    "npm": "^8.15.0"
  }
}
about 4 years ago · Santiago Gelvez
2 Respuestas
Responde la pregunta

0

I copied your code into my editor and didn't face any errors. Double check the directory you are working from in your terminal and then try updating express

about 4 years ago · Santiago Gelvez Denunciar

0

first, check that express is installed or not

if not run the following command

npm i express 

also, check that you are using the latest version of the node

if all ok then run

node index.js

is still an issue not fixed submit your folder structure and package.json so I can give you further assistance

Remove npm from dependency

about 4 years ago · Santiago Gelvez 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