Vector000 / bilive_client

基于Node.JS的bilibili直播挂机系统
MIT License
150 stars 30 forks source link

报错:SyntaxError: Unexpected end of JSON input #14

Closed last2win closed 4 years ago

last2win commented 5 years ago

第一遍run的时候没问题,重新编译再跑的时候报错:

undefined:1

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at new Options (/home/ubuntu/bilive_client/build/options.js:50:33)
    at Object.<anonymous> (/home/ubuntu/bilive_client/build/options.js:91:19)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
Vector000 commented 5 years ago

出现这种问题,很有可能是options.json损坏,我想个办法

ghost commented 5 years ago

出现这种问题,很有可能是options.json损坏,我想个办法

今天我也遇到了这个问题...

Vector000 commented 5 years ago

如果是同一个文件的同一个位置报错的话,基本可以肯定是保存json配置文件的时候出bug了,options/options.json损坏,我之前树莓派断电的时候遇到过。。。我在想要不要搞一个json设置文件的自动备份的功能

发送自 Windows 11


发件人: darknessice notifications@github.com 发送时间: Friday, June 28, 2019 2:10:52 PM 收件人: Vector000/bilive_client 抄送: Vector000; Comment 主题: Re: [Vector000/bilive_client] 报错:SyntaxError: Unexpected end of JSON input (#14)

出现这种问题,很有可能是options.json损坏,我想个办法

今天我也遇到了这个问题...

― You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Vector000/bilive_client/issues/14?email_source=notifications&email_token=AH6IONHRCTRXV65AEE4NJ6TP4WTOZA5CNFSM4HGQDQB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYZFHFA#issuecomment-506614676, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH6IONB2JQHESOBK6GFKMSLP4WTOZANCNFSM4HGQDQBQ.

ghost commented 5 years ago

如果是同一个文件的同一个位置报错的话,基本可以肯定是保存json配置文件的时候出bug了,options/options.json损坏,我之前树莓派断电的时候遇到过。。。我在想要不要搞一个json设置文件的自动备份的功能 发送自 Windows 11 ____ 发件人: darknessice notifications@github.com 发送时间: Friday, June 28, 2019 2:10:52 PM 收件人: Vector000/bilive_client 抄送: Vector000; Comment 主题: Re: [Vector000/bilive_client] 报错:SyntaxError: Unexpected end of JSON input (#14) 出现这种问题,很有可能是options.json损坏,我想个办法 今天我也遇到了这个问题... ― You are receiving this because you commented. Reply to this email directly, view it on GitHub<#14?email_source=notifications&email_token=AH6IONHRCTRXV65AEE4NJ6TP4WTOZA5CNFSM4HGQDQB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYZFHFA#issuecomment-506614676>, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH6IONB2JQHESOBK6GFKMSLP4WTOZANCNFSM4HGQDQBQ.

的确是这个文件的问题了,下个clone重编译出来个options.json替换了原先的就不会这样了,这次设置完自己手动备份了一个。