Economy-Bot
Economy-Bot copied to clipboard
parse-ms does not work with require()
Hello, I realized that parse-ms cannot be included with require() As i get this error
import parseMilliseconds from 'parse-ms' ^^^^^^
SyntaxError: Cannot use import statement outside a module
Thats why i used the source code from parse-ms to create parse-ms-2, https://www.npmjs.com/package/parse-ms-2 All the source is in github (https://github.com/dionsyran2/parse-ms-2), so you can have a look and make sure i am not giving you a virus or something.
Thanks for reading
Have a nice day, dionsyran2
Hey! Change require to import and i find it works just fine!
Hey! Change require to import and i find it works just fine!
only that you need to change my project to module to use import, but if i do i cannot use require or import other modules, because they only work with require()
hmm, sometimes it doesnt require you to have require for all of them, i changed all my requires to import. clone your files to a new folder and try that.