2

I installed serverless-offline with the following command

npm install serverless-offline --save-dev

This is the version that was installed:

"serverless-offline": "^10.0.0"

and have added plugins at the bottom of my yaml file:

plugins:
  - serverless-offline

Now when I run a serverless command, I get the following error: enter image description here

Not sure what's going on.

p.s. Before installing the serverless-offline, the serverless commands were all working as expected.

webber
  • 595
  • 3
  • 10
  • 20

2 Answers2

2

Check that your version of nodeJs matches the version of nodeJs you have in your serverless.yml.

I had the same problem because I was using nodejs12 and I set up nodejs14 in my serverless.yml. Upgrade to nodejs14 fix the problem.

Basile Lamarque
  • 161
  • 1
  • 7
0

The problem for me here was due to serverless-offline version 12.0.4. I downgraded to version ^8.7.0 which fixed the problem for me.

Selvesan Malakar
  • 511
  • 2
  • 7
  • 20