意外令牌} |但我找不到它

时间:2019-06-23 02:31:04

标签: javascript node.js

我正在使用nodejs为我的网站设置一个随机化器,但是我在脚本结尾始终收到SyntaxError。我个人找不到它,并寻求帮助(如果有)!

到目前为止,我一直在四处寻找,以查看错误是否在代码中更深处并且什么也没发现。

function time() {
  return parseInt(new Date().getTime()/1000)
}

function generate(count) {
    return crypto.randomBytes(count).toString('hex');
}

function array_limit(wartosc){
  if(chat_history.length==25){
    chat_history.shift();
    chat_history.shift();
  }
  chat_history.push(wartosc);
}

function jp_limit(wartosc){
  if(jpWinners.length==10){
    jpWinners.shift();
  }
  jpWinners.push(wartosc);
}
function getRandomInt(min, max) {
  return Math.floor(Math.random() * (max - min + 1) + min);
} //this is the error line

我认为这应该可以正常运行,我的控制台输出在下面,也许我犯了一个小错误,但我正在认真考虑签到最近的眼科医生! :

    :2241
});
^

SyntaxError: Unexpected token }
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3

Edit1:当前版本为版本(8.16.0-1nodesource1)。

Config.js

var config = {};

config.db = '';
config.host = '';
config.user = '';
config.password = '';

config.admin = '';
config.botsteamid = {bot1:''};
config.identitysecret = '';
config.sharedsecret = '';
config.polling_interval  = 5000;

config.bot_username = '';
config.bot_password = '';

config.manager_domain = '';
config.manager_lang = 'en';
config.manager_cancelTime = 60000;

module.exports = config;

我删除了一些敏感数据*

1 个答案:

答案 0 :(得分:0)

尝试将tf.estimator.RunConfig(save_checkpoints_steps=SOME_SMALL_VALUE_TO_VERIFY)文件的内容移动到webpack.config.js文件

相关问题