Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

240
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

0

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

const query = { _id: ObjectId('yourid') };
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda