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

241
Vistas
Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer

I am new to coding so I can not understand and solve this problem if you want please help me.

C:\projects\assignment-11\spice-warehouse-server\node_modules\bson\lib\error.js:41 var _this = _super.call(this, message) || this; ^

BSONTypeError: Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer at new BSONTypeError (C:\projects\assignment-11\spice-warehouse-server\node_modules\bson\lib\error.js:41:28) at new ObjectId (C:\projects\assignment-11\spice-warehouse-server\node_modules\bson\lib\objectid.js:66:23) at ObjectId (C:\projects\assignment-11\spice-warehouse-server\node_modules\bson\lib\objectid.js:26:20) at C:\projects\assignment-11\spice-warehouse-server\index.js:38:33 at Layer.handle [as handle_request] (C:\projects\assignment-11\spice-warehouse-server\node_modules\express\lib\router\layer.js:95:5) at next (C:\projects\assignment-11\spice-warehouse-server\node_modules\express\lib\router\route.js:144:13) at Route.dispatch (C:\projects\assignment-11\spice-warehouse-server\node_modules\express\lib\router\route.js:114:3) at Layer.handle [as handle_request] (C:\projects\assignment-11\spice-warehouse-server\node_modules\express\lib\router\layer.js:95:5) at C:\projects\assignment-11\spice-warehouse-server\node_modules\express\lib\router\index.js:286:22 at param (C:\projects\assignment-11\spice-warehouse-server\node_modules\express\lib\router\index.js:367:14) [nodemon] app crashed - waiting for file changes before starting...

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Your problem may be related to express.js related, so if this is your problem then you first turn off your server pressing by ctrl + c then turn it on again, then you go to your UI and hit reload then it will work properly.

about 4 years ago · Juan Pablo Isaza Denunciar

0

Your ID is not being sent. You can try this way:

const query = { _id: ObjectId('yourid') };
about 4 years ago · Juan Pablo Isaza 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