I have tried using the node_modules/.bin/babel before.js -o after.js command to convert from es6 to compatible js. I also had to run set-executionpolicy remotesigned on windows powershell to fix error cannot be loaded because running
scripts is disabled on this system.
As it stands the node_modules/.bin/babel before.js -o after.js command is throwing
SyntaxError (file directory link) Error while parsing config - JSON5: invalid end of input at 1:1.
It seems that the problem was caused by my Execution policy being restricted. For those who are concerned with similar problems. Similar errors like the one above can be fixed by opening Windows PowerShell as administrator and running command
Get-ExecutionPolicy -Scope CurrentUserand finding out if your script access is unrestricted. If it isn't then the following command can be usedSet-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachinefollowed by the Y or N answering of the question and you're set.