0

I have Amazon Linux and I installed npm using epel repository. After npm I installed pageres with

npm install --global pageres-cli

I already have a phantomjs version 1.9.8

When I try to run pageres it is giving me this error:

/usr/lib/node_modules/pageres-cli/node_modules/pageres/node_modules/mem/index.js:36
memoized.cache = opts.cache || new Map();
^
ReferenceError: Map is not defined
at module.exports (/usr/lib/node_modules/pageres-cli/node_modules/pageres/node_modules/mem/index.js:36:41)
at Object. (/usr/lib/node_modules/pageres-cli/node_modules/pageres/dist/util.js:452:35)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/lib/node_modules/pageres-cli/node_modules/pageres/dist/index.js:213:48)
at Module._compile (module.js:456:26)

I don't know how to fix this please let me know.

Regards, Mansur

1 Answer 1

0

The error was related to node version pageres required v0.12 but by using package manager installed node version is v0.10 i have fixed the issue with below steps.

[root@ifr4 ~]# wget https://raw.githubusercontent.com/creationix/nvm/v0.13.1/install.sh

[root@ifr4 ~]# chmod +x install.sh

[root@ifr4 ~]# ./install.sh

[root@ifr4 ~]# nvm list-remote

[root@ifr4 ~]# nvm install v0.12.0

[root@ifr4 ~]# nvm use v0.12.0

[root@ifr4 ~]# pageres google.com

✔ Generated 1 screenshot from 1 url and 1 size

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.