ForestAdmin / forest-express

🧱 Dependency of Express Lianas for Forest Admin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Release 2.14.0 requires babel

pianomansam opened this issue · comments

It looks like forest-express started using babel back in release 2.9.0 according to the changelog but only as a dev dependency. However, it appears that release 2.14 introduced a dependency on babel in the distributed code. You can see this in routes/sessions.js and services/login-handler.js on lines 3-9. I believe this is a result of commit b4dec67 which introduced the ability to use async/await.

I would prefer not to create a dependency to babel in my app.

Expected behavior

Today went to work on an app that uses the forest-express-mongoose implementation of this. I had my version pinned to ^2.5.0 and the app was working in production. Upon starting some new work after a break, I was unable to get my forest express app working with the latest release. It was complaining of being unable to find the babel-runtime/regenerator module.

Failure Logs

module.js:478
    throw err;
    ^

Error: Cannot find module 'babel-runtime/regenerator'
    at Function.Module._resolveFilename (module.js:476:15)
    at Function.Module._load (module.js:424:25)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/app/admin/node_modules/forest-express/dist/routes/sessions.js:3:20)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/app/admin/node_modules/forest-express/dist/index.js:17:20)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/app/admin/node_modules/forest-express-mongoose/index.js:3:17)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)

Thanks @pianomansam, we'll fix this issue, this afternoon for sure.

@pianomansam it is fixed in the latest liana versions (v2.13.1 for express-mongoose and v2.15.4 for express-sequelize).

Thanks for the valuable feedback!

🌲🌲🌲

Thanks for quickly addressing, this, @arnaudbesnier. I've tested express-mongoose v2.13.1 and it appears to be working great.