Getting TypeError: implementation.SchemaAdapter is not a constructor Error

I’m getting an error error when I try to run forestadmin locally

Expected behavior

npm start should spin up forestadmin dashboard

Actual behavior

Getting an error

Failure Logs

[forest] 🌳🌳🌳  An error occured while computing the Forest schema. Your application schema cannot be synchronized with Forest. Your admin panel might not reflect your application models definition. implementation.SchemaAdapter is not a constructor
TypeError: implementation.SchemaAdapter is not a constructor
    at /Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/dist/generators/schemas.js:16:14
    at tryCatcher (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/util.js:16:23)
    at Object.gotValue (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/reduce.js:166:18)
    at Object.gotAccum (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/reduce.js:155:25)
    at Object.tryCatcher (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromiseCtx (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/promise.js:641:10)
    at _drainQueueStep (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/async.js:97:12)
    at _drainQueue (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:458:21)
(node:39182) UnhandledPromiseRejectionWarning: TypeError: implementation.SchemaAdapter is not a constructor
    at /Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/dist/generators/schemas.js:16:14
    at tryCatcher (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/util.js:16:23)
    at Object.gotValue (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/reduce.js:166:18)
    at Object.gotAccum (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/reduce.js:155:25)
    at Object.tryCatcher (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromiseCtx (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/promise.js:641:10)
    at _drainQueueStep (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/async.js:97:12)
    at _drainQueue (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/loubna/Documents/AbstractOps/server-admin/node_modules/forest-express/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:458:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:39182) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:39182) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Context

Please provide any relevant information about your setup.

"@google-cloud/storage": "^5.1.2",
"chalk": "~1.1.3",
"cookie-parser": "1.4.4",
"cors": "2.8.5",
"debug": "~4.0.1",
"dotenv": "~6.1.0",
"express": "~4.16.3",
"express-jwt": "5.3.1",
"forest-express-sequelize": "^6.0.0",
"morgan": "1.9.1",
"os": "^0.1.1",
"pg": "~8.2.2",
"require-all": "^3.0.0",
"sequelize": "~5.15.1"
  • Database Dialect: postgres
  • Database Version:12.3.2
  • Project Name: server-admin
2 Likes

Hi @lowly2005 :wave: thank you for your feedback.

Have you proceed to an upgrade of the forest-express-sequelize package ?

@Arnaud_Moncel I am getting the same problem. I tried npm update forest-express-sequelize.
I also tried using yarn instead of npm, same issues…

An error occured while computing the Forest schema. Your application schema cannot be synchronized with Forest. Your admin panel might not reflect your application models definition. implementation.SchemaAdapter is not a constructor
TypeError: implementation.SchemaAdapter is not a constructor
    at /Users/oscar/projects/payroll/vcsi_payroll_dev/node_modules/forest-express-sequelize/node_modules/forest-express/dist/generators/schemas.js:16:14
    at tryCatcher (/Users/oscar/projects/payroll/vcsi_payroll_dev/node_modules/forest-express-sequelize/node_modules/forest-express/node_modules/bluebird/js/release/util.js:16:23)
    at Object.gotValue (/Users/oscar/projects/payroll/vcsi_payroll_dev/node_modules/forest-express-sequelize/node_modules/forest-express/node_modules/bluebird/js/release/reduce.js:166:18)
    at Object.gotAccum (/Users/oscar/projects/payroll/vcsi_payroll_dev/node_modules/forest-express-sequelize/node_modules/forest-express/node_modules/bluebird/js/release/reduce.js:155:25)
    at Object.tryCatcher (/Users/oscar/projects/payroll/vcsi_payroll_dev/node_modules/forest-express-sequelize/node_modules/forest-express/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/oscar/projects/payroll/vcsi_payroll_dev/node_modules/forest-express-sequelize/node_modules/forest-express/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/Users/oscar/projects/payroll/vcsi_payroll_dev/node_modules/forest-express-sequelize/node_modules/forest-express/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromiseCtx (/Users/oscar/projects/payroll/vcsi_payroll_dev/node_modules/forest-express-sequelize/node_modules/forest-express/node_modules/bluebird/js/release/promise.js:641:10)
    at _drainQueueStep (/Users/oscar/projects/payroll/vcsi_payroll_dev/node_modules/forest-express-sequelize/node_modules/forest-express/node_modules/bluebird/js/release/async.js:97:12)
    at _drainQueue (/Users/oscar/projects/payroll/vcsi_payroll_dev/node_modules/forest-express-sequelize/node_modules/forest-express/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/Users/oscar/projects/payroll/vcsi_payroll_dev/node_modules/forest-express-sequelize/node_modules/forest-express/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/oscar/projects/payroll/vcsi_payroll_dev/node_modules/forest-express-sequelize/node_modules/forest-express/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:456:21)

this is my package.json

{
  "name": "vcsi_payroll_dev",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node ./server.js"
  },
  "dependencies": {
    "body-parser": "1.19.0",
    "chalk": "~1.1.3",
    "cookie-parser": "1.4.4",
    "cors": "2.8.5",
    "debug": "~4.0.1",
    "dotenv": "~6.1.0",
    "express": "~4.16.3",
    "express-jwt": "5.3.1",
    "forest-express": "^7.4.0",
    "forest-express-sequelize": "^6.3.7",
    "morgan": "1.9.1",
    "pg": "~8.2.2",
    "require-all": "^3.0.0",
    "sequelize": "~5.15.1"
  }
}

Hi @oscar6654 :wave: welcome to our community.

What is your version of node please ?

v14.2.0.

Not sure if I am installing/setting forest admin correctly. I am using rails.
this is my folder structure…

Ok guys we introduced a regression on latest release of forest-express-sequelize.
You can easily fix your problem by fixing the version of this package to

"forest-express-sequelize": "6.3.6",

I will keep you update when the fix was released.
Thank you again and sorry for the inconvenience.

1 Like

Hey guys a fix has been released you can use

"forest-express-sequelize": "^6.0.0", / "6.3.8",
2 Likes

Thanks for the quick response :pray:

1 Like