Issue: enviroment not working. Error: "The .forestadmin-schema.json file does not exist"

Hello, i’m presenting this problem when trying to create another environment call staging. I already have development and production.
In this case im using a docker and AWS.

After following the steps to add a new environment, in the last step Set your environment variables is still loading.
The server logs are:

I have already seen the other posts where they fix it by changing the docker-file but there is no case. The docker-file I am using is already:

FROM node:10-alpine
WORKDIR /usr/src/app
COPY . .
RUN npm install
CMD [“npm”, “start”]

What could be the problem or what am I forgetting?

Hello @usr1vang,

Thank you for your message.

When your are on en environment which is not a development one, the .forestadmin-schema.json file is not generated.
We expect you to reuse the one generated on your development environment, ideally by pushing it to your source management tool (eg GitHub repository).

Please let me know if this solves the issue.

Yes, i know that. The file it is in the repo, i mean the .forestadmin-schema.json file it is in the folder with all other files for the app. For this reason, I do not understand why this error occurs.


We released a fix in forest-cli yesterday that could help.

Could you try to add the line below to your Dockerfile after ENV NODE_PATH=...


And this in middlewares/forestadmin.js after authSecret: process.env....

schemaDir: process.env.FOREST_SCHEMA_DIR,

Thank you

1 Like