Forest init unable to set up the development environment

Feature(s) impacted

I want to setup my project on another computer in order to create a new smart action, so I followed the development workflow getting started guide (Development workflow - Developer guide).

Observed behavior

Unfortunately the forest init command is failing with the following message:

√ Selecting your project
√ Analyzing your setup
√ Checking your database setup
× Setting up your development environment
× Cannot read properties of null (reading 'match')

What is causing this issue, How can I solve it?

What I’ve tried

I first installed the forest-cli, then run forest login. I authenticated without any issues.
I tried to run the command with the project launched with npm start and without, it doesn’t seems like it changed anything. I also tried to create a .env file with the following content, but it didn’t changed anything either (if I understand it well, forest init should give me values for my .env file so it shouldn’t be required for the forest init command right?).

FOREST_ENV_SECRET=<my-forest-env-secret>
APPLICATION_URL=<my-application-url>
DATABASE_SSL=true
DATABASE_URL=<my-mongodb-database-url>
FOREST_AUTH_SECRET=<my-forest-auth-secret>
NODE_ENV=production

Context

  • Project name: mppv2admin
  • Team name: monpetitparquet
  • Environment name: production (?)
  • Agent type & version: forest-express-mongoose 8.7.0

Hello and welcome,
The cli forest init - Developer guide does’t provide the .env values. These values are confidential. You can copy/past your .env from you previous computer to the new.
Also, your cli does’t seem to be up to date, please run these commands:
npm update -g forest-cli
forest --version => should display forest-cli/3.0.6.
After that, try to run forest init again :slight_smile:
I hope It will help you.

Thank you for the information, I provided the required values to my .env file.

I ran npm update -g forest-cli and forest --version. It shows forest-cli/3.0.6 linux-x64 node-v16.18.1.
I tried to run forest init again but it still shows me the same output. May it be related to my node version?

I have try to run the cli with your node version and I don’t have any issue.
Please, try to remove your old development environment, and run the forest init again.
Remove all the data in your .env, and select the correct project. Is It the same result ?
Do you have any other errors please ?