Getting Errors when cloning Strapi from Github

System Information
  • Strapi Version: 4.1.2
  • Operating System: MacOS 11.6.3
  • Database:
  • Node Version: 14.17.5
  • NPM Version: 6.14.14
  • Yarn Version: 1.22.17

I cloned a strapi project from a colleague’s github repository, then ran npm install (this seemed to go fine), then tried to run npm run develop and go the following error(s):

2022-03-22 15:23:23.455] debug: :no_entry: Server wasn’t able to start properly.
[2022-03-22 15:23:23.456] error: Middleware “strapi::session”: App keys are required. Please set app.keys in config/server.js (ex: keys: [‘myKeyA’, ‘myKeyB’])
Error: Middleware “strapi::session”: App keys are required. Please set app.keys in config/server.js (ex: keys: [‘myKeyA’, ‘myKeyB’])

etc. etc.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-project@0.1.0 start: strapi start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-project@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I have googled and searched and done everything I can think of. I deleted the node-modules and started over, I cleared the caches and started over. I’m new to Strapi and kind of at a loss of what else to try. Help?


check your node.js version, only LTS versions are supported (v12 and v14)

my node version is 14.17.5

The second line is giving you the error. You need to add app keys in the the config/server.js file like so:
image
I believe these keys can be any random characters.

OK - that seems to have worked. It made me create a new username and password, but it looks like it is showing me the correct info. Just waiting for my colleague to confirm that it is indeed correct. Thank you!

1 Like

Happy to help!

That was definitely it - we are up and running for collaboration now - yay! Thank you, again!

1 Like