sharvit/mongoose-data-seed

md-seed run command display an error.

Shahjalal7311 opened this issue · 0 comments

Node Version: v10.12.0
npm version: 6.4.1
Mongo Version: MongoDB shell version v4.2.3

After run md-seed run command i get following error.

{ SyntaxError: /Applications/MAMP/htdocs/recat-partice/react_admin/md-seed-config.js: Support for the experimental syntax 'exportDefaultFrom' isn't currently enabled (12:8):

10 | * @type {Object}
11 | */

12 | export seedersList = {
| ^
13 | Users,
14 | Categorys
15 | };

Add @babel/plugin-proposal-export-default-from (https://git.io/vb4yH) to the 'plugins' section of your Babel config to enable transformation.
at Parser._raise (/Users/reivo/.nvm/versions/node/v10.12.0/lib/node_modules/mongoose-data-seed/node_modules/@babel/parser/lib/index.js:742:17)
at Parser.raiseWithData (/Users/reivo/.nvm/versions/node/v10.12.0/lib/node_modules/mongoose-data-seed/node_modules/@babel/parser/lib/index.js:735:17)
at Parser.expectPlugin (/Users/reivo/.nvm/versions/node/v10.12.0/lib/node_modules/mongoose-data-seed/node_modules/@babel/parser/lib/index.js:8762:18)
at Parser.maybeParseExportDefaultSpecifier (/Users/reivo/.nvm/versions/node/v10.12.0/lib/node_modules/mongoose-data-seed/node_modules/@babel/parser/lib/index.js:12199:12)
at Parser.parseExport (/Users/reivo/.nvm/versions/node/v10.12.0/lib/node_modules/mongoose-data-seed/node_modules/@babel/parser/lib/index.js:12151:29)
at Parser.parseStatementContent (/Users/reivo/.nvm/versions/node/v10.12.0/lib/node_modules/mongoose-data-seed/node_modules/@babel/parser/lib/index.js:11185:27)
at Parser.parseStatement (/Users/reivo/.nvm/versions/node/v10.12.0/lib/node_modules/mongoose-data-seed/node_modules/@babel/parser/lib/index.js:11081:17)
at Parser.parseBlockOrModuleBlockBody (/Users/reivo/.nvm/versions/node/v10.12.0/lib/node_modules/mongoose-data-seed/node_modules/@babel/parser/lib/index.js:11656:25)
at Parser.parseBlockBody (/Users/reivo/.nvm/versions/node/v10.12.0/lib/node_modules/mongoose-data-seed/node_modules/@babel/parser/lib/index.js:11642:10)
at Parser.parseTopLevel (/Users/reivo/.nvm/versions/node/v10.12.0/lib/node_modules/mongoose-data-seed/node_modules/@babel/parser/lib/index.js:11012:10)
loc: Position { line: 12, column: 7 },
pos: 293,
missingPlugin: [ 'exportDefaultFrom' ],
code: 'BABEL_PARSE_ERROR' }

Why i get the error will you explain?
Thanks.