An error occurs. Please tell me how to fix?
Uncaught TypeError: Cannot read property 'replace' of undefined Quote
Module: /node_modules/cron/lib/cron.js
Error line code:
source = this.source.replace (/ [az] {1,3} / ig, function (alias) {
Function code:
_parse: function() { var aliases = CronTime.aliases, source = this.source.replace(/[az]{1,3}/ig, function(alias) { alias = alias.toLowerCase(); if (alias in aliases) { return aliases[alias]; } throw new Error('Unknown alias: ' + alias); }), split = source.replace(/^\s\s*|\s\s*$/g, '').split(/\s+/), cur, i = 0, len = timeUnits.length; for (; i < timeUnits.length; i++) { // If the split source string doesn't contain all digits, // assume defaults for first n missing digits. // This adds support for 5-digit standard cron syntax cur = split[i - (len - split.length)] || CronTime.parseDefaults[i]; this._parseField(cur, timeUnits[i], CronTime.constraints[i]); } }
console.log(this.source);in front of the line with an errorconsole.log(this.source);and see what is contained there. I think there should be a string so that there is no error. - Visman