I'm using Strapi to generate REST api. I've created a content type (named article) - and using it in production mode & it is working fine. Now, I added a new content type (named vidtops), which works fine in development mode (no errors), but on switching to production mode, I'm unable to create a new entry in vidtops. However, the earlier endpoint (article) is working fine.
I'm using:-
strapi version = 3.0.0-alpha.25.2
on Ubuntu 18.04 (installed on AWS lightsail)
Node version = 10.15.3
npm version = 6.4.1
Mongodb version = 4.0.7
pm2 version = 3.4.0
This is the code I'm using for production launch:-
export NODE_ENV=production
pm2 start npm --name api -- start
while in dev mode, I use strapi start
.
On clicking "add new entry", the spinner keeps running forever, here is the screenshot:-
The new content type is not available under 'Content manger' section, here is the screenshot:-
I've tried many things in the last 48 hours, but it behaves abnormally. For once, I was able to create multiple content types and use them in production mode on a different server, with the same versions of the tools and same launch code.
It's due to the schema management for the admin. There is some issue on GitHub about that.
You will have to remove in your core_store
table/collection the entry with key
=== plugin_content-manager_schema
Then restart your app and it will work.