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.