Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON Parse error: Unexpected identifier "undefined" #8

Closed
yj0524 opened this issue Jan 7, 2024 · 1 comment
Closed

JSON Parse error: Unexpected identifier "undefined" #8

yj0524 opened this issue Jan 7, 2024 · 1 comment

Comments

@yj0524
Copy link
Contributor

yj0524 commented Jan 7, 2024

Node.js v21.5.0

undefined:1
undefined
^

SyntaxError: "undefined" is not valid JSON
    at JSON.parse (<anonymous>)
    at /node_modules/chzzk/dist/api/live.js:48:55
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /index.js:41:24

Node.js v21.5.0

Bun v1.0.21

43 |                 const livePlaybackJson = content['livePlaybackJson'];
44 |                 const livePlayback = livePlaybackJson ? JSON.parse(livePlaybackJson) : null;
45 |                 delete content['livePlaybackJson'];
46 |                 const channel = content['channel'];
47 |                 const channelLivePollingStatusJson = channel['livePollingStatusJson'];
48 |                 const channelLivePollingStatus = JSON.parse(channelLivePollingStatusJson);
                                                      ^
SyntaxError: JSON Parse error: Unexpected identifier "undefined"
      at /node_modules/chzzk/dist/api/live.js:48:50
      at processTicksAndRejections (:61:77)

1.1.1 버전까지는 발생하지 않던 오류였으나, 1.1.2 버전에서 오류가 발생합니다.

  • 문제가 발생하는 코드
const liveDetail = await client.live.detail(channel.channelId);
@kimcore
Copy link
Owner

kimcore commented Jan 7, 2024

1.1.3 버전에서 해결되었습니다. 제보 감사합니다!

@kimcore kimcore closed this as completed Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants