Comments (5)
I've added plugin:
"plugins": [
"add-module-exports"
]
Issue replaced with another one:
TypeError: Class constructor Seeder cannot be invoked without 'new'
I've modified preset and everything seems to work now:
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
],
"plugins": [
"add-module-exports"
]
}
Thank for the help @sharvit!
I don't understand difference between @babel/preset-env
& @babel/env
, but first one works in my case.
from mongoose-data-seed.
This issue could be related to this comment: #8 (comment)
from mongoose-data-seed.
Thank you for submitting an issue @antonkomarev
Any chance you can supply an environment/repository that showcases the issue?
It might help in this case so I can reproduce the error.
Some directions you can try:
- Upgrading to node-12 (AFAIK node-11 is not stable)
- Try downgrading
mongoose-data-seed version
to version2.1.1
or2.0.1
, it might give us a clue if we the new version is broke.
Thanks
from mongoose-data-seed.
I've tried to downgrade to 2.1.1
& 2.0.1
but no luck, issue is in place.
The only difference in error output in 2.0.1
:
TypeError: Seeder is not a constructor
at MdSeedRunner._callee5$ (/home/test-app/node_modules/mongoose-data-seed/dist/lib/core/md-seed-runner.js:334:26)
at tryCatch (/home/test-app/node_modules/regenerator-runtime/runtime.js:45:40)
at Generator.invoke [as _invoke] (/home/test-app/node_modules/regenerator-runtime/runtime.js:271:22)
at Generator.prototype.(anonymous function) [as next] (/home/test-app/node_modules/regenerator-runtime/runtime.js:97:21)
at asyncGeneratorStep (/home/test-app/node_modules/mongoose-data-seed/dist/lib/core/md-seed-runner.js:24:103)
at _next (/home/test-app/node_modules/mongoose-data-seed/dist/lib/core/md-seed-runner.js:26:194)
at /home/test-app/node_modules/mongoose-data-seed/dist/lib/core/md-seed-runner.js:26:364
at new Promise (<anonymous>)
at MdSeedRunner.<anonymous> (/home/test-app/node_modules/mongoose-data-seed/dist/lib/core/md-seed-runner.js:26:97)
at MdSeedRunner._runSeeder (/home/test-app/node_modules/mongoose-data-seed/dist/lib/core/md-seed-runner.js:370:28)
at MdSeedRunner._callee4$ (/home/test-app/node_modules/mongoose-data-seed/dist/lib/core/md-seed-runner.js:281:29)
at tryCatch (/home/test-app/node_modules/regenerator-runtime/runtime.js:45:40)
at Generator.invoke [as _invoke] (/home/test-app/node_modules/regenerator-runtime/runtime.js:271:22)
at Generator.prototype.(anonymous function) [as next] (/home/test-app/node_modules/regenerator-runtime/runtime.js:97:21)
at asyncGeneratorStep (/home/test-app/node_modules/mongoose-data-seed/dist/lib/core/md-seed-runner.js:24:103)
at _next (/home/test-app/node_modules/mongoose-data-seed/dist/lib/core/md-seed-runner.js:26:194)
Repository where I'm trying to start using your package is proprietary, so I can't share it, but will try to create a public sandbox if there will be no solution found.
from mongoose-data-seed.
Upgrade node to v12.8.1
didn't help too.
from mongoose-data-seed.
Related Issues (20)
- Error: Cannot find module 'core-js/stable'
- Problem running inside docker-compose using volumes HOT 2
- An in-range update of mongoose is breaking the build 🚨 HOT 2
- Incorrect installing v 2.1.0 HOT 3
- An in-range update of mongoose is breaking the build 🚨
- An in-range update of eslint is breaking the build 🚨 HOT 3
- Cannot use ES6 imports in md-seed run command HOT 6
- An in-range update of babel7 is breaking the build 🚨 HOT 1
- An in-range update of babel7 is breaking the build 🚨 HOT 6
- An in-range update of eslint is breaking the build 🚨 HOT 3
- Docs HOT 1
- An in-range update of babel7 is breaking the build 🚨 HOT 13
- An in-range update of prettier is breaking the build 🚨 HOT 2
- An in-range update of core-js is breaking the build 🚨 HOT 4
- Custom md-seed-config.js location HOT 4
- md-seed run command display an error.
- An in-range update of babel7 is breaking the build 🚨
- Support for Typescript seeders or allow passing custom extension HOT 1
- Not able to run seeders HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongoose-data-seed.