vue 3 버전으로 sockjs를 이용하여 간단한 채팅을 만들어보고 있는데, 다음과 같은 에러가 났다.
event.js:8 Uncaught ReferenceError: global is not defined
at node_modules/sockjs-client/lib/utils/event.js (event.js:8)
at __require (chunk-T7KYDC53.js?v=a7e674ed:6)
at node_modules/sockjs-client/lib/transport/websocket.js (websocket.js:3)
at __require (chunk-T7KYDC53.js?v=a7e674ed:6)
at node_modules/sockjs-client/lib/transport-list.js (transport-list.js:5)
at __require (chunk-T7KYDC53.js?v=a7e674ed:6)
at node_modules/sockjs-client/lib/entry.js (entry.js:3)
at __require (chunk-T7KYDC53.js?v=a7e674ed:6)
at dep:sockjs-client:1
node_modules/sockjs-client/lib/utils/event.js @ event.js:8
__require @ chunk-T7KYDC53.js?v=a7e674ed:6
node_modules/sockjs-client/lib/transport/websocket.js @ websocket.js:3
__require @ chunk-T7KYDC53.js?v=a7e674ed:6
node_modules/sockjs-client/lib/transport-list.js @ transport-list.js:5
__require @ chunk-T7KYDC53.js?v=a7e674ed:6
node_modules/sockjs-client/lib/entry.js @ entry.js:3
__require @ chunk-T7KYDC53.js?v=a7e674ed:6
(anonymous) @ dep:sockjs-client:1
vue 3 버전으로 sockjs를 이용하여 간단한 채팅을 만들어보고 있는데, 다음과 같은 에러가 났다.
일단 비슷한 증상이 있는 분들이 있어서
낄껴
했다.https://github.com/sockjs/sockjs-client/issues/547
global 이슈는 여기를 참조하여 해결 할 수 있다.