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

287
Visualizações
Serverless TypeError: chalk(...).dim is not a function

I am trying to test the serverless lambda function using the command

Command

serverless invoke local -f send --log --stage test

Error

TypeError: chalk(...).dim is not a function

Entire stacktrace:

Type Error ---------------------------------------------

  TypeError: chalk(...).dim is not a function
      at /snapshot/serverless/lib/Serverless.js:83:47
      at /snapshot/serverless/node_modules/graceful-fs/graceful-fs.js:123:16
      at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:61:3)
  From previous event:
      at Serverless.init (/snapshot/serverless/lib/Serverless.js:72:8)
      at /snapshot/serverless/bin/serverless.js:74:8
      at processImmediate (internal/timers.js:439:21)
      at process.topLevelDomainCallback (domain.js:130:23)
  From previous event:
      at Object.<anonymous> (/snapshot/serverless/bin/serverless.js:64:4)
      at Module._compile (pkg/prelude/bootstrap.js:1261:22)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:993:10)
      at Module.load (internal/modules/cjs/loader.js:813:32)
      at Function.Module._load (internal/modules/cjs/loader.js:725:14)
      at Function.Module.runMain (pkg/prelude/bootstrap.js:1316:12)
      at internal/main/run_main_module.js:17:11

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              12.13.1
     Framework Version:         1.64.0 (standalone)
     Plugin Version:            3.4.0
     SDK Version:               2.3.0
     Components Core Version:   1.1.2
     Components CLI Version:    1.4.0

This command is run inside the directory which has serverless.yml, requirements.txt, handler.py.

Unable to understand why this error occurs and what's the solution

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I believe this is a bug in the Standalone version of the Serverless Framework.

I've opened a PR to address this https://github.com/serverless/serverless/pull/7412

In the meantime, this bug is caused by the fact that Serverless Framework v1.65.0 was just released. You can resolve this by upgrading, which will cause this erroneous codepath to not be called.

Thanks!

over 4 years ago · Santiago Trujillo 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