Plugin/Preset files are not allowed to export objects, only functions

Hi there!

When I running any tests, i getting:

Error: Plugin/Preset files are not allowed to export objects, only functions. In D:\WsProject\mflix-js\node_modules\babel-preset-stage-1\lib\index.js
at createDescriptor (D:\WsProject\mflix-js\node_modules@babel\core\lib\config\config-descriptors.js:178:11)
at D:\WsProject\mflix-js\node_modules@babel\core\lib\config\config-descriptors.js:109:50
at Array.map ()
at createDescriptors (D:\WsProject\mflix-js\node_modules@babel\core\lib\config\config-descriptors.js:109:29)
at createPresetDescriptors (D:\WsProject\mflix-js\node_modules@babel\core\lib\config\config-descriptors.js:101:10)
at presets (D:\WsProject\mflix-js\node_modules@babel\core\lib\config\config-descriptors.js:47:19)
at mergeChainOpts (D:\WsProject\mflix-js\node_modules@babel\core\lib\config\config-chain.js:320:26)
at D:\WsProject\mflix-js\node_modules@babel\core\lib\config\config-chain.js:283:7
at buildRootChain (D:\WsProject\mflix-js\node_modules@babel\core\lib\config\config-chain.js:120:22)
at loadPrivatePartialConfig (D:\WsProject\mflix-js\node_modules@babel\core\lib\config\partial.js:85:55)
npm ERR! Test failed. See above for more details.

Please check the below post and let me know if it works!

Kanika

HI Kanika,
I am also getting same error. I installed nodejs v10.15.3 .Please help on this

Hi @Anuja_05255,

Have you gone through this post, if yes, please share the full error in your console.

Db-connection fails while application works

Kanika

Thanks Kanika. It worked.