# Upgrade to v9 not working

**URL:** <https://community.forestadmin.com/t/upgrade-to-v9-not-working/6963>\
**Category:** Help me!\
**Created:** [January 12, 2024, 9:01pm UTC](https://community.forestadmin.com/t/upgrade-to-v9-not-working/6963 "2024-01-12T21:01:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jenn.proos](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@jenn.proos](https://community.forestadmin.com/u/jenn.proos)\
**Post date:** [January 12, 2024, 9:01pm UTC](https://community.forestadmin.com/t/upgrade-to-v9-not-working/6963/1 "2024-01-12T21:01:36Z")

</div>

## Observed behavior

A red banner appears at the top of the portal that reads The agent version on which your project is running (v8.4.8) will soon reach its end-of-life and needs to be upgraded. Our backend is hosted on an EC2 instance. I performed the following steps to upgrade to v9:

1. SSH into our dev EC2 instance
2. Switch to root user
3. Change directories to ~/portal
4. Ran npm install “forest-express-sequelize@^9.0.0”
5. Killed the process running the express app
6. Ran npm start
7. Refreshed the UI and still observed the red banner and saw that “Agent Version” was still 8.4.8

Other things we tried/observed:

- I did a “cat .forestadmin-schema.json” and saw that meta.liana\_version was still 8.4.8
- We also tried rebooting the EC2 instance but did not see desired behavior
- Tried removing the package-lock.json and tried the npm install again

## Expected behavior

After following steps 1-6 above I was expecting the red banner to go away and the Agent Version to be updated to 9.3.10

## Context

- Project name: charitywater
- Team name: Twisthink
- Environment name: Test
- Agent (forest package) name & version: current is 8.4.8
- Database type: postgres
- Recent changes made on your end if any: ran npm install “forest-express-sequelize@^9.0.0” and restarted server

---

<div class="post-metadata">

**Author:** ![Alban\_Bertolini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alban_bertolini/32/1077_2.png) [@Alban\_Bertolini](https://community.forestadmin.com/u/Alban_Bertolini)\
**Post date:** [January 15, 2024, 10:19am UTC](https://community.forestadmin.com/t/upgrade-to-v9-not-working/6963/2 "2024-01-15T10:19:20Z")

</div>

Hello,  
Does NODE\_ENV is equal to “production”?

To upgrade your agent and propage the upgrade to your `.forestadmin-schema.json` you should not be in production environment because the schema is not re-generated in production due to performance reasons. The recommended process is to upgrade agent in environment development, start agent (will trigger the `.forestadmin-schema.json` updates) and commit everything to push it on production. If you don’t have development environment (not recommended) you must change NODE\_ENV to `development` and restart your agent and switch again NODE\_ENV to `production`.

Tell me if this message helps you 🙏

---

<div class="post-metadata">

**Author:** ![jenn.proos](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@jenn.proos](https://community.forestadmin.com/u/jenn.proos)\
**Post date:** [January 16, 2024, 5:14pm UTC](https://community.forestadmin.com/t/upgrade-to-v9-not-working/6963/4 "2024-01-16T17:14:55Z")

</div>

Please forgive me as I am not very experienced with forest admin technologies. I do not understand the steps you recommended to upgrade the agent in the development environment.

**More context**

Our environments we have are as follows:

- Development
- Test
- Staging
- Production

The Development environment’s backend URL points to `http://localhost:3310`. When I go to Project Settings \> Environment \> Development, the Agent Version does appear to be 9.3.10. If I understand correctly, I have upgraded the agent successfully in our Development environment by running the backend on my local machine with the latest agent installed (9.3.10).

**Objective**

My goal now is to get the Test environment, whose backend URL points to an Amazon EC2 hosted backend, to have the same agent (9.3.10). I’d like to propagate to Staging and Production once I’ve verified the change looks good in our Test environment.

What should next steps be to propagate this to our Test environment? I am looking at the docs [here](https://docs.forestadmin.com/documentation/getting-started/development-workflow) but I don’t fully understand what I need to do. If I am simply trying to update the agent, do I need to create a branch? How do I “commit everything to push it on production”?

Thanks,

Jenn

---

<div class="post-metadata">

**Author:** ![Alban\_Bertolini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alban_bertolini/32/1077_2.png) [@Alban\_Bertolini](https://community.forestadmin.com/u/Alban_Bertolini)\
**Post date:** [January 16, 2024, 8:44pm UTC](https://community.forestadmin.com/t/upgrade-to-v9-not-working/6963/5 "2024-01-16T20:44:13Z")

</div>

The Development workflow is not useful to upgrade your agent.  
Once you have upgraded your agent version in development, you should commit the code changes (packages.json, source code, .forestadmin-schema.json etc.) to push it on production/Staging/Test. Pull the code in each server, install, build and restart server as if you were updating a library. That’s all.

---

<div class="post-metadata">

**Author:** ![jenn.proos](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@jenn.proos](https://community.forestadmin.com/u/jenn.proos)\
**Post date:** [January 17, 2024, 6:49pm UTC](https://community.forestadmin.com/t/upgrade-to-v9-not-working/6963/6 "2024-01-17T18:49:48Z")

</div>

Thanks Alban, this process worked!

Jenn

---

<div class="post-metadata">

**Author:** ![Alban\_Bertolini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alban_bertolini/32/1077_2.png) [@Alban\_Bertolini](https://community.forestadmin.com/u/Alban_Bertolini)\
**Post date:** [January 17, 2024, 9:54pm UTC](https://community.forestadmin.com/t/upgrade-to-v9-not-working/6963/7 "2024-01-17T21:54:35Z")

</div>

great ! 😇 Have a good time with forest.
