I’ve run into a strange blocker issue in setting up Forest Admin, and would love some help please.
In late December 2020 I was able to successfully create a project to test out Forest Admin. I created a development MySQL database (RDS on AWS) with a recent copy of our system data, and was able to get the Forest Admin back-end successfully running locally on my machine. Everything connected and I was able to login through the Forest Admin Web interface and check out a lot of the functionality. I was very happy with how seamlessly that quick test went.
Yesterday, I tried to run another test in preparation to explore and evaluate Forest Admin further. I had ended up deleting the original project in the Forest Admin system, so I created a new project and started the process of creating the Docker image and running it as I had done before in December. I used the exact same development MySQL DB which was still running from earlier; there were no changes made to the DB in the interim and I am the only one using it. However, when I ran docker-compose up for the new project I got the following error:
occu_admin_test_1 | /usr/src/app/node_modules/sequelize/lib/associations/has-many.js:138
occu_admin_test_1 | this.sourceKeyField = this.source.rawAttributes[this.sourceKey].field || this.sourceKey;
occu_admin_test_1 | ^
occu_admin_test_1 |
occu_admin_test_1 | TypeError: Cannot read property 'field' of undefined
occu_admin_test_1 | at HasMany._injectAttributes (/usr/src/app/node_modules/sequelize/lib/associations/has-many.js:138:69)
occu_admin_test_1 | at Function.hasMany (/usr/src/app/node_modules/sequelize/lib/associations/mixin.js:37:17)
occu_admin_test_1 | at Function.Groupings.associate (/usr/src/app/models/groupings.js:54:15)
occu_admin_test_1 | at Object.keys.forEach (/usr/src/app/models/index.js:48:19)
occu_admin_test_1 | at Array.forEach (<anonymous>)
occu_admin_test_1 | at Object.<anonymous> (/usr/src/app/models/index.js:46:17)
occu_admin_test_1 | at Module._compile (internal/modules/cjs/loader.js:778:30)
occu_admin_test_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
occu_admin_test_1 | at Module.load (internal/modules/cjs/loader.js:653:32)
occu_admin_test_1 | at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
occu_admin_test_1 | at Function.Module._load (internal/modules/cjs/loader.js:585:3)
occu_admin_test_1 | at Module.require (internal/modules/cjs/loader.js:692:17)
occu_admin_test_1 | at require (internal/modules/cjs/helpers.js:25:18)
occu_admin_test_1 | at Object.<anonymous> (/usr/src/app/routes/api-keys.js:3:21)
occu_admin_test_1 | at Module._compile (internal/modules/cjs/loader.js:778:30)
occu_admin_test_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
occu_admin_test_1 | at Module.load (internal/modules/cjs/loader.js:653:32)
occu_admin_test_1 | at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
occu_admin_test_1 | at Function.Module._load (internal/modules/cjs/loader.js:585:3)
occu_admin_test_1 | at Module.require (internal/modules/cjs/loader.js:692:17)
occu_admin_test_1 | at require (internal/modules/cjs/helpers.js:25:18)
occu_admin_test_1 | at /usr/src/app/node_modules/require-all/index.js:56:46
occu_admin_test_1 | at Array.forEach (<anonymous>)
occu_admin_test_1 | at requireAll (/usr/src/app/node_modules/require-all/index.js:34:9)
occu_admin_test_1 | at Object.<anonymous> (/usr/src/app/app.js:56:1)
occu_admin_test_1 | at Module._compile (internal/modules/cjs/loader.js:778:30)
occu_admin_test_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
occu_admin_test_1 | at Module.load (internal/modules/cjs/loader.js:653:32)
occu_admin_test_1 | at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
occu_admin_test_1 | at Function.Module._load (internal/modules/cjs/loader.js:585:3)
occu_admin_test_1 | at Module.require (internal/modules/cjs/loader.js:692:17)
occu_admin_test_1 | at require (internal/modules/cjs/helpers.js:25:18)
occu_admin_test_1 | at Object.<anonymous> (/usr/src/app/server.js:5:13)
occu_admin_test_1 | at Module._compile (internal/modules/cjs/loader.js:778:30)
occu_admin_test_1 | npm ERR! code ELIFECYCLE
occu_admin_test_1 | npm ERR! errno 1
occu_admin_test_1 | npm ERR! occu-admin-test1@0.0.1 start: `node ./server.js`
occu_admin_test_1 | npm ERR! Exit status 1
occu_admin_test_1 | npm ERR!
occu_admin_test_1 | npm ERR! Failed at the occu-admin-test1@0.0.1 start script.
occu_admin_test_1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
occu_admin_test_1 |
occu_admin_test_1 | npm ERR! A complete log of this run can be found in:
occu_admin_test_1 | npm ERR! /root/.npm/_logs/2021-01-22T23_40_47_366Z-debug.log
occu_admin_test_1 exited with code 1
I tried the NPM route as well and also got the same error. I also tried the entire process on a new EC2 instance in AWS and experienced the same error.
What’s happening here and how can this be resolved? It’s very strange as the DB is the exact same as before when it worked; the data has not changed at all on that machine and I followed the same steps as before. The only thing that I found that is different versus late December is that lumber itself has updated (I noticed that it pulled a new image dated as of 9 days ago). Any chance that is related?
Any guidance you can provide would be greatly appreciated.
Thanks! Nick