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

**URL:** <https://forum.serverless.com/t/error-on-deploy-command-failed-serverless-version/14092>\
**Category:** Serverless Framework\
**Created:** [February 18, 2021, 12:59am UTC](https://forum.serverless.com/t/error-on-deploy-command-failed-serverless-version/14092 "2021-02-18T00:59:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pwhitfield-cashwerkz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/pwhitfield-cashwerkz/32/5264_2.png) [@pwhitfield-cashwerkz](https://forum.serverless.com/u/pwhitfield-cashwerkz)\
**Post date:** [February 18, 2021, 12:59am UTC](https://forum.serverless.com/t/error-on-deploy-command-failed-serverless-version/14092/1 "2021-02-18T00:59:29Z")

</div>

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](http://docs.serverless.com)  
Bugs: [github.com/serverless/serverless/issues](http://github.com/serverless/serverless/issues)  
Issues: [forum.serverless.com](http://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

---

<div class="post-metadata">

**Author:** ![pwhitfield-cashwerkz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/pwhitfield-cashwerkz/32/5264_2.png) [@pwhitfield-cashwerkz](https://forum.serverless.com/u/pwhitfield-cashwerkz)\
**Post date:** [February 18, 2021, 5:13am UTC](https://forum.serverless.com/t/error-on-deploy-command-failed-serverless-version/14092/2 "2021-02-18T05:13:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jtiret](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/jtiret/32/5294_2.png) [@jtiret](https://forum.serverless.com/u/jtiret)\
**Post date:** [February 25, 2021, 2:53pm UTC](https://forum.serverless.com/t/error-on-deploy-command-failed-serverless-version/14092/3 "2021-02-25T14:53:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dfcowell](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/dfcowell/32/5755_2.png) [@dfcowell](https://forum.serverless.com/u/dfcowell)\
**Post date:** [May 24, 2021, 1:01am UTC](https://forum.serverless.com/t/error-on-deploy-command-failed-serverless-version/14092/4 "2021-05-24T01:01:39Z")

</div>

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.
