0👍
✅
I solve this error.
remove import statement from ‘html2canvas’ & change my function as bellow
screenshot(){
const html2canvas = require('html2canvas');
console.log('Function Screenshot');
html2canvas(document.getElementById('photo')).then(function(canvas){
document.body.appendChild(canvas)
});
}
Source:stackexchange.com