Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

288
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!