Error on deploy - Command failed: ...../serverless --version

this deploy works for other devs, but not for me.

Running sls deploy --stage dev

gives the following error:

Error --------------------------------------------------

Error: Command failed: /Users/peterwhitfield/.serverless/bin/serverless --version
internal/modules/cjs/loader.js:1030
throw err;
^

Error: Cannot find module ‘/Users/peterwhitfield/projects/xxxxx/xxxxx/services/xxxxx-service/–version’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1027:15)
at Function.Module._resolveFilename (pkg/prelude/bootstrap.js:1346:46)
at Function.Module._load (internal/modules/cjs/loader.js:896:27)
at Function.Module.runMain (pkg/prelude/bootstrap.js:1375:12)
at internal/main/run_main_module.js:17:47 {
code: ‘MODULE_NOT_FOUND’,
requireStack: []
}

  at ChildProcess.exithandler (child_process.js:303:12)
  at ChildProcess.emit (events.js:315:20)
  at ChildProcess.EventEmitter.emit (domain.js:485:12)
  at maybeClose (internal/child_process.js:1051:16)
  at Socket.<anonymous> (internal/child_process.js:442:11)
  at Socket.emit (events.js:315:20)
  at Socket.EventEmitter.emit (domain.js:485:12)
  at Pipe.<anonymous> (net.js:670:12)

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

Your Environment Information ---------------------------
Operating System: darwin
Node Version: 14.4.0
Framework Version: 2.25.1 (standalone)
Plugin Version: 4.4.3
SDK Version: 2.3.2
Components Version: 3.7.0

appears to be related to the serverless-layers plugin in some way

Hi @pwhitfield-cashwerkz, I have the same issue. Did you eventually find a solution?

I wound up here with the same problem. Started poking around and it turned out I was using the wrong version of Node for my project. It expected 12.x and I was using 14.x.

It was using 12.x inside the project directory thanks to NVM, however unfortunately due to how Serverless works, it will invoke the global Node version. nvm use -g 12 fixed this for me, your mileage may vary depending on what version your project expects.