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

Michele Spina picture Michele Spina · Dec 17, 2013 · Viewed 15.5k times · Source

When I try to upload my Node.js project on Elastic Beanstalk I obtain the following error:

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.

However, I have the package.json in the main directory.

Answer

Federico picture Federico · Aug 15, 2014

A couple of people were zipping the parent folder incorrectly. You need to select all the contents of the folder and zip those.

https://forums.aws.amazon.com/message.jspa?messageID=477087 https://forums.aws.amazon.com/thread.jspa?threadID=130140&tstart=0