4

I have created 2 NodeJs environments. It works fine.

Later created a new environment and eb deploy env_name give me the following error:

Creating application version archive "app-ceb7-200713_223016".
Uploading appname/app-ceb7-xxxxx.zip to S3. This may take a while.
Upload Complete.
2020-07-13 17:00:23    INFO    Environment update is starting.      
2020-07-13 17:00:44    INFO    Deploying new version to instance(s).
2020-07-13 17:00:50    ERROR   [Instance: i-066f599db7ee34] Command failed on instance. 
An unexpected error has occurred [ErrorCode: 0000000001].
2020-07-13 17:00:50    INFO    Command execution completed on all instances. Summary: 
[Successful: 0, Failed: 1].
2020-07-13 17:00:50    ERROR   Unsuccessful command execution on instance id(s) 'i- 
06682f599db76ee34'. Aborting the operation.
2020-07-13 17:00:50    ERROR   Failed to deploy application.        
                                                                  
ERROR: ServiceError - Failed to deploy application.

Why this happen? Thanks in advance

Dennis Kozevnikoff
  • 2,078
  • 3
  • 19
  • 29
  • 1
    You would have to get EB logs to identify this "Unsuccessful command " and the error message it produces. Have you tried that? – Marcin Jul 14 '20 at 00:03
  • During an aborted deployment, some instances may have deployed the new application version. To ensure all instances are running the same version, re-deploy the appropriate application version. This one – Ashwanth Madhav Jul 14 '20 at 02:30
  • I mean, full EB logs. You can get them from AWS EB console. On the left in your environment there should be menu with `Logs` option. Alternatively, have to login to the EB instance and check logs in `/var/log` folder. – Marcin Jul 14 '20 at 02:31
  • 1
    An error occurred during execution of command [app-deploy] - [Install customer specified node.js version]. Stop running the command. Error: unsupported node version >=6, please specify any of node versions in [v12.0.0 v12.1.0 v12.10.0 v12.11.0 v12.11.1 v12.12.0 v12.13.0 v12.13.1 v12.14.0 v12.14.1 v12.15.0 v12.16.0 v12.16.1 v12.16.2 v12.16.3 v12.17.0 v12.18.0 v12.18.1 v12.2.0 v12.3.0 v12.3.1 v12.4.0 v12.5.0 v12.6.0 v12.7.0 v12.8.0 v12.8.1 v12.9.0 v12.9.1] . I think this is the issue. Removing node_modules and retrying it – Ashwanth Madhav Jul 14 '20 at 02:36
  • Sounds good. let me know how it will go. I can make an answer if it works :-) – Marcin Jul 14 '20 at 02:38
  • @Marcin Not working. How to specify node version? – Ashwanth Madhav Jul 14 '20 at 02:45
  • You can have look [here](https://stackoverflow.com/questions/29349684/how-can-i-specify-the-required-node-js-version-in-package-json). – Marcin Jul 14 '20 at 02:47
  • 1
    @Marcin Thanks alot. Added `"engines": { "node": "12.13.0"},` It worked fine – Ashwanth Madhav Jul 14 '20 at 02:55

1 Answers1

9

Based on the comments.

To solve the issue, EB logs were inspected to identify the error message:

[app-deploy] - [Install customer specified node.js version]. Stop running the command. Error: unsupported node version >=6, please specify any of node versions in [v12.0.0 v12.1.0 v12.10.0 v12.11.0 v12.11.1 v12.12.0 v12.13.0 v12.13.1 v12.14.0 v12.14.1 v12.15.0 v12.16.0 v12.16.1 v12.16.2 v12.16.3 v12.17.0 v12.18.0 v12.18.1 v12.2.0 v12.3.0 v12.3.1 v12.4.0 v12.5.0 v12.6.0 v12.7.0 v12.8.0 v12.8.1 v12.9.0 v12.9.1]

Then, the correct version of the nodejs was specified in package.json:

"engines": { "node": "12.13.0"},
Marcin
  • 215,873
  • 14
  • 235
  • 294