var retext = require('retext');
var overuse = require('retext-overuse');
retext()
.use(overuse)
.process([
'That movie was amazing',
'The acting was amazing',
'The story was amazing'
].join('\n'), function (err, file) {
if (file.message.length > 0) {
console.log(file.messages);
}
});
TypeError: Cannot read property 'message' of undefined
at /home/vignesh/Documents/master2/PET_Project/spellcheck/Test1.js:18:16
at done (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/unified/index.js:369:11)
at next (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/trough/index.js:42:9)
at done (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/trough/wrap.js:55:16)
at done (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/unified/index.js:30:7)
at done (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/unified/index.js:300:11)
at next (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/trough/index.js:42:9)
at done (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/trough/wrap.js:55:16)
at wrapped (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/trough/wrap.js:36:14)
at next (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/trough/index.js:57:24)
This problem can solved by the following changes in the index.js file retext-overuse in line no 96.
Change the file.warn to file.message in the index.js file of the module...
please change it and provide the new version ASAP.
var retext = require('retext'); var overuse = require('retext-overuse');
retext() .use(overuse) .process([ 'That movie was amazing', 'The acting was amazing', 'The story was amazing' ].join('\n'), function (err, file) { if (file.message.length > 0) { console.log(file.messages); } });
TypeError: Cannot read property 'message' of undefined at /home/vignesh/Documents/master2/PET_Project/spellcheck/Test1.js:18:16 at done (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/unified/index.js:369:11) at next (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/trough/index.js:42:9) at done (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/trough/wrap.js:55:16) at done (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/unified/index.js:30:7) at done (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/unified/index.js:300:11) at next (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/trough/index.js:42:9) at done (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/trough/wrap.js:55:16) at wrapped (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/trough/wrap.js:36:14) at next (/home/vignesh/Documents/master2/PET_Project/spellcheck/node_modules/trough/index.js:57:24)
This problem can solved by the following changes in the index.js file retext-overuse in line no 96.
Change the file.warn to file.message in the index.js file of the module...
please change it and provide the new version ASAP.