Moderate — If you are receiving this error, your music addons most likely won't work.
SyntaxError: Unexpected token in JSON at position 0
We use an NPM package called erela.js to interact with Lavalink. The latest version of this package on NPM still uses another package called petitio, which is causing these errors. To fix this, you must update to the most recent build directly from erela.js's GitHub page. Luckily, this is pretty easy to do. Follow the instructions below according to your Operating System.
To fix this error, please follow the instructions below according to the Operating System that Corebot is running on. If the bug fix does not resolve the issue, please open a ticket in our Discord support server (https://corebot.dev/support).
npm i menudocs/erela.js#build
If you haven't installed any extra packages or edited your package.json before:
If you have installed extra packages or you've edited your package.json:
"erela.js": "^2.3.3",
line in your package.json to "erela.js": "github:menudocs/erela.js#build",
If you are still receiving the same error message after following the steps above, please consider removing your package manager's lockfile (
package-lock.json
for npm,yarn.lock
for yarn andpnpm-lock.yaml
for pnpm) and restarting your bot. Additionally, you may also want to delete your/data/errors.txt
before proceeding.