Forest-admin.json file

Hello everyone,
I am not able to find forest-admin.json file in project root.
Can you please help me to locate where it could be ?

Expected behavior

Actual behavior

Failure Logs

Context

  • Package Version:
  • Express Version:
  • Sequelize Version:
  • Database Dialect:
  • Database Version:
  • Project Name:

Hello @alexis.montcel and welcome to our community :slight_smile:

Do you mean .forestadmin-schema.json?

Kind regards,
Mia

Hello @mian ,

Sorry for getting back to you late, I was waiting from developper’s answer.
He replied : how to get forest Admin json file which is not available in our project root folder while development environment.?
And to respond yes it’s .forestadmin-schema.json ?

Regards,
Alexis Montcel

@mian
To explain a bit better, after running this command nothing happens while it suppose to create json file :
$ forest init
√ Selecting your project
√ Analyzing your setup
√ Checking your database setup
√ Setting up your development environment
? Do you want your current folder .env file to be completed automatically with your environment variables? Yes
√ Copying the environment variables in your .env file
√ You’re now set up and ready to develop on Forest Admin

To learn more about the recommended usage of this CLI, please visit https://docs.forestadmin.com/documentation/reference-guide/how-it-works/developing-on-forest-admin/forest-cli-commands.

$ forest schema:apply
Reading “.forestadmin-schema.json” from current directory…
× Cannot find the file “.forestadmin-schema.json” in this directory. Please be sure to run this command inside your project directory.

Do not hesitate @louis if you know the answer :slight_smile: Cheers, Alexis

Hello @alexis.montcel,

Can you run these 2 commands on your terminal please and show me the output?:

  • pwd
  • ls -la

Please find below the two files showing the outcome @mian
It’s a wetransfer file as I cannot upload appendix from mobile.

Thanks,
Regards

In the 3 files you have sent me, we cannot see the hidden files.
I need you to run in your terminal the commands send above (pwd and ls -la) to check the path of your directory and the hidden files present in this directory.

Hi Mian

Please find missing hidden files in given screenshot.

Hello @mian , Rahil will take the conversation from here. Thanks for the help provided in advance

1 Like

Hello @morganperre would you be able to help us on that issue ? Thanks :slight_smile:

Hello @alexis.montcel,

Sorry, Mia was off this morning.

Can you try to run the agent before executing forest schema:apply ? (To run the agent you can use npm start make sure your .env is correctly configured which should be the case)

Then tell me if the .forestadmin-schema.json appears in your file. :slight_smile:

I’m looking forward to hearing from you.

Kind regards,
Morgan

Hello @morganperre ,
Thanks for your answer, I have passed it to Rahil the developper.
Will let you know once I hear from him.
Thanks,
Alexis

1 Like

Hi Morgan,
In our case we have nest js framework. So I need to do nest start to start the server. But when I am starting it after it still I am not getting the file as well as localhost:3301 is also not working as development server.

I have followed below procedure.

forest init

Then I have setup the MySQL credentials in .env file.
Then I have started the server.

yarn run nest-start

My API server is started on 3456 port. But forest admin development server is not started on 3301 port.

Hey @rahil3002,

You’re in in-APP mode ? You have an instance of Forest-Express-Sequelize in your “main API” server, that’s it ?

Can you paste the code you use to mount/attach Forest inside your nest server ?

Kind regards,
Morgan

Actually it was done by old developer but he has not provided it so we are trying to fetch it.
The project is based on nest and typeorm.

Ok @rahil3002,

Can you give me your project name ? I will check on our side.

Also do you have the code related to forest-admin ? Do you have it on GitHub ? Because forest init does not fetch the code it only initialise the project with the right settings on your side.

Project name is Happyporteur :slight_smile:

1 Like

Ok. It does not seems to be an IN-APP installation.

To confirm, could you find forest-express-sequelize in your code base ?

Thanks in advance,
Morgan