server에서 abortController is not defined error 가 발생할 수 있다. node version을 올려주면 발생하지 않는다. node version을 15 이상으로 올리면 발생 하지 않는다.
발생하는 이유(참조 링크: https://stackoverflow.com/questions/68693319/why-am-i-getting-a-referenceerror-abortcontroller-is-not-defined-in-discord-js)
Why this broke in v13?:
A few versions ago of discordjs, a feature was added that aborts requests that take too long (longer than 15 seconds). In order to achieve this functionality, they were previously using the node package abort-controller. However, now that nodejs has evolved, it now has its own AbortController global without the need to require an external package. Discord.js v13 now relies on this global as they're no longer using the abort controller package. In order to use the AbortController global provided by nodejs, you need to be using node v15 or higher - however, as recommended by the discord.js guide, you should be using v16.6+ to enable support for other features it may use.
//node version 확인
node -v
//node version 변경
nvm use 16.14.2
//만약 16.14.2 없으면
nvm install 16.14.2
'Coding > server' 카테고리의 다른 글
Server - REMOTE HOST IDENTIFICATION HAS CHANGED error (0) | 2022.01.18 |
---|---|
Server - mediasoup 설치 error (0) | 2022.01.05 |
Server - login-server-tutorial (0) | 2021.12.05 |
Server - node - express -typescript (0) | 2021.09.05 |