0

I'm trying to deploy a basic node application but whenever I try to deploy it I get an error saying: "Failed to find package.json. Node.js may have issues starting. Verify package.json is valid or place code in a file named server.js or app.js."

I have tried re-creating the zip file and restarting the node file I have tried validating my package.json and it is valid

my app.js is simply:


const server = http.createServer( (req,res) => {
    res.writeHead(200, {"Content-Type" : "text/plain"})
    res.end("Hello World")
})

server.listen(3000)

console.log("Listening on port 3000")

my package.json file is:

{
  "name": "Tutorial",
  "version": "1.0.0",
  "description": "A simple Hello World",
  "main": "app.js",

  "author": "kittom",
  "license": "ISC"
}

It should allow me to see hello world on port 3000 of the url

  • Please check https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/nodejs-platform-packagejson.html – Shubham Sharma Jun 16 '19 at 00:41
  • Possible duplicate of [Amazon Elastic Beanstalk npm cant find package.json](https://stackoverflow.com/questions/35387822/amazon-elastic-beanstalk-npm-cant-find-package-json) – Shubham Sharma Jun 16 '19 at 00:55

0 Answers0