TypeError: nativeMax is not a function
sadahadim opened this issue · comments
I'm building browser extension for screenshots and I'm trying to implement Pageres. I bundled the file with Browserify and Webpack with this code:
const Pageres = require('pageres');
var pageres = new Pageres({delay: 2})
.src(window.location.href, ['1920x1080'])
.src('data:text/html,<h1>Awesome!</h1>', ['1024x768'])
.dest('screenshots')
.run();
But when i run extension with Browserify, it throws TypeError: nativeMax is not a function
and highlights this line:
start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
this is line is from lodash. What is the problem?
I tried with Webpack, bundling went well, but it tells me after execution that: ReferenceError: require is not defined
None of those error are directly related to Pageres. Use Stack Overflow for support questions.