Elastic Beanstalk deploy error with specific package.json

0

Elastic Beanstalk platform is Node.js 18 running on 64bit Amazon Linux 2/5.8.0. Deploy error with the message:

2023-04-16 15:36:30    INFO    Environment update is starting.      
2023-04-16 15:36:37    INFO    Deploying new version to instance(s).
2023-04-16 15:37:12    ERROR  ** Instance deployment: 'npm' failed to install dependencies that you defined in 'package.json'.** For details, see 'eb-engine.log'. The deployment failed.
2023-04-16 15:37:12    ERROR   Instance deployment failed. For details, see 'eb-engine.log'.
2023-04-16 15:37:14    ERROR   [Instance: i-0aa2ec405f17059a4] Command failed on instance. Return code: 1 Output: Engine execution has encountered an error..
2023-04-16 15:37:14    INFO    Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2023-04-16 15:37:14    ERROR   Unsuccessful command execution on instance id(s) 'i-0aa2ec405f17059a4'. Aborting the operation.
2023-04-16 15:37:14    ERROR   Failed to deploy application.                                                                              
ERROR: ServiceError - Failed to deploy application.

The error shows: 'npm' failed to install dependencies that you defined in 'package.json'. But I yarn install on local machine with node version is v18.4.0 is success。 The package.json is:

{
  "name": "aws-demo",
  "version": "1.0.0",
  "description": "aws demo to test package.json install ",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "parse-dashboard": "~5.0.x",
    "parse-server": "~6.0.x"
  },
  "engines": {
    "node": ">=16.x"
  }
}

Can I get more details about the dependency error, or does anyone has some experience about this error? Thanks.

asked a year ago977 views
1 Answer
0
Accepted Answer

There was a similar problem with the following.
In that case, it seems that the instance was failing due to insufficient specs, so the specs were increased to solve the problem.
If I deploy it once I have increased the specs, will it succeed?
https://repost.aws/questions/QU5Nef-o8FT5uoDLO1YTho3w/elastic-beanstalk-npm-install-fails-without-error-message
https://stackoverflow.com/questions/71589818/why-npm-install-failed-only-in-elasticbeanstalk

profile picture
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions