For years now I've been using Phantom.js for some server-side browsing feature. For 2 mains reason it recently leads me to find a replacement:
- I am now on a ARM based infrastructure and the binary I was using was no longer working
- Phantom.js project is no longer under development as far as I know
So recently I've run through this on Twitter
When it came to find a replacement for Phantom.js I thought about this.
- Create your Node.js Project with puppeteer as dependency
yarn add puppeteer or
npm i install puppeteer
2. For a debian based distribution install chromium
apt-get install chromium
3. Get chromium binary location
which chromium you'll get
4. Just reference that binary for puppeteer just as suggested on Mathias Bynens's Tweet above
You can have an overview of issue for running puppeteer on a arm based environment from Github issue there:
If you are not referencing chromium on arm based infrastructure you'll get errors
That's all for today, enjoy.