Error when building project with browserify

  browserify, build, html, javascript, windows

Error when building project with browserify

I’ve been having a lot of trouble trying to install babel libraries for the tmi.js module which apparently requires older versions of babel or something. I was able to get past the “MISSING MODULE” error by installing the older modules but now I’m getting this error:

Error: Plugin/Preset files are not allowed to export objects, only functions. In C:UsersMeDesktopCodingtwitchbotnode_modulesbabel-preset-es2015libindex.js while parsing file: C:UsersMeDesktopCodingtwitchbotnode_modulestmi.jsindex.js
at createDescriptor (C:[email protected]ig-descriptors.js:178:11)
at C:[email protected]ig-descriptors.js:109:50
at (<anonymous>)
at createDescriptors (C:[email protected]ig-descriptors.js:109:29)
at createPresetDescriptors (C:[email protected]ig-descriptors.js:101:10)
at C:[email protected]ig-descriptors.js:58:104
at cachedFunction (C:[email protected]ing.js:62:27)
at (<anonymous>)
at evaluateSync (C:UsersMeDesktopCodingtwitchbotnode_modulesgensyncindex.js:244:28)
at sync (C:UsersMeDesktopCodingtwitchbotnode_modulesgensyncindex.js:84:14)

If anyone has any idea why this is happening I would appreciate if you could help me out a bit.

Source: StackOverflow