How Do I Upgrade Node.js and Run Puppeteer Apps?

PostAlmostAnything

Active Member
Mar 3, 2020
36
0
6
Portland, Oregon
cPanel Access Level
Website Owner
I have an app that works great on my local Windows PC, but when I upload it to my server I get this error:

App 23654 output: at Interface.helper_js_1.helper.addEventListener (/home/username/public_html/example.com/app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:183:68)
App 23654 output: at onClose (/home/username/public_html/example.com/app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)

To address this I thought I'd upgrade to the latest version of Node.js, but even after installing nvm and running the n stable command I am still told my version of Node is 10 when I type /opt/cpanel/ea-nodejs10/bin/node -v into SSH.

Then I went back and looked at the log from when the latest version of node was installed and it looks like it was installed to
/usr/local/n/versions/node/14.16.0 instead of /opt/cpanel/ea-nodejs10/bin. How do I upgrade the version of Node used by cPanel to the latest stable version?

Also, does anyone know what might cause Puppeteer not to work?
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,519
1,028
313
cPanel Access Level
Root Administrator
Hey there! There isn't a supported tool from cPanel at this time that will let you update NodeJS. We're working on this and hope to get that updated soon.

CloudLinux does over the NodeJS selector here:


so you may be interested in exploring that.

I'm not sure about the Puppeteer issue, as they say anything higher than Node v6 should work well. You may want to reach out to them directly to see if they can offer more details.