The objectMapping option appears to be missing

After updating our staging environment to the latest FA and updating node to version v15.11.0 I am seeing the errors below.

Environment:

$ npm outdated
Package          Current  Wanted   Latest   Location  
chalk           1.1.3            1.1.3   4.1.0   roadsync2
cookie-parser   1.4.4            1.4.4   1.4.5   roadsync2
debug           4.0.1            4.0.1   4.3.1   roadsync2
dotenv          6.1.0            6.1.0   8.2.0   roadsync2
express         4.16.4           4.16.4  4.17.1  roadsync2
express-jwt     5.3.1            5.3.1   6.0.0   roadsync2
forest-express  7.10.1           7.10.1  8.0.5   roadsync2
morgan          1.9.1            1.9.1   1.10.0  roadsync2
pg              8.2.2            8.2.2   8.5.1   roadsync2
sequelize       5.15.2           5.15.2  6.5.0   roadsync2
undefined

Errors Below:

$ npm start

> roadsync2@0.0.1 start

> node ./server.js

[forest] 🌳🌳🌳 The objectMapping option appears to be missing. Please make sure it is set correctly.

{}

Your application is listening on port 3310.

Your admin panel is available here: https://app.forestadmin.com/projects

OPTIONS /forest/sessions 204 0 - 2.314 ms

[forest] 🌳🌳🌳 The Liana has not been initialized to enable the authentication.

{}

POST /forest/sessions 401 92 - 12.396 ms

[forest] 🌳🌳🌳 The Liana has not been initialized to enable the authentication.

{}

POST /forest/sessions 401 92 - 2.119 ms

[forest] 🌳🌳🌳 The Liana has not been initialized to enable the authentication.

{}

POST /forest/sessions 401 92 - 1.490 ms

[forest] 🌳🌳🌳 The Liana has not been initialized to enable the authentication.

{}

POST /forest/sessions 401 92 - 1.440 ms

[forest] 🌳🌳🌳 The Liana has not been initialized to enable the authentication.

{}

POST /forest/sessions 401 92 - 1.391 ms

[forest] 🌳🌳🌳 The Liana has not been initialized to enable the authentication.

{}

POST /forest/sessions 401 92 - 1.432 ms

Hello @Jack_Roberts,

It looks like you migrated to the V7 version of Forest Admin.
Did you correctly follow the migration steps in the documentation?

Your issue is related to the breaking changes

The liana initialization now takes objectMapping and connections as parameters (see lines 8 and 9).

Let me know if it helps :slight_smile:

1 Like

Thank you for this info, Guillaume. I want to “complain” a little bit, though:
On the “Upgrade to v7” page, under the “Upgrading to v7” section, it says, "To upgrade to v7, simply run: npm install forest-express-mongoose@^7.0.0". I did that and then closed the FA upgrade info page. It would really prevent a lot of misunderstanding if that sentence said, “To upgrade to v7, run the following and then update your files as shown in the ‘Breaking Changes’ section below:”

“To upgrade…simply run” means you only have to run one thing. “To upgrade, run the following and update your files” means you have to do a few things. I’m not trying to be a pain in the rear, I just hope that making things more clear to people might be helpful to FA and its users. Cheers! -DM

3 Likes

Hello @dmullen

Indeed, the phrasing in the doc was quite unclear.
I just updated the documentation.

Thank you for the suggestion!

2 Likes

That’s great, thanks for updating it!

1 Like