Closed burgerboydaddy closed 6 years ago
Yep. This is a side effect of using Babel. In Aqua I use those modules together too and indeed, there is a.babelrc
file where I'm ignoring the models directory.
I don't think this needs to be mentioned anywhere else besides the Babel docs. mongo-models
uses built-in JS class and inheritance mechanics. Any modules using the same patterns would be affected by Babel too.
Hello, I tried to use hapi 17 with hapi-react-views and mongo-models (hapi-mongo-models) and I found the issue when I joined all together. In general, babel (required by React) creates an error when I try to use a model. Recommendation if using react-views and mongo-models add to app .babelrc with:
{ "ignore": [ "server/api/*.js", "server/models/*.js" ] }
(replace my path with your).ps. maybe this should go to hapi-mongo-models :-)