• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question How to install Puppeteer in AlmaLinux?

Azurel

Silver Pleskian
Server operating system version
AlmaLinux 8.10
Plesk version and microupdate number
18.0.65
I want add a NodeJS script in folder /home/puppet/ with module puppeteer. So I tried install:
/opt/plesk/node/23/bin/node /opt/plesk/node/23/bin/npm install puppeteer
and get this error:
# /opt/plesk/node/23/bin/node /opt/plesk/node/23/bin/npm install puppeteer
(node:2232535) ExperimentalWarning: CommonJS module /opt/plesk/node/23/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /opt/plesk/node/23/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
npm error code 1
npm error path /home/puppet/node_modules/puppeteer
npm error command failed
npm error command sh -c node install.mjs
npm error /home/puppet/node_modules/puppeteer/install.mjs:34
npm error const {downloadBrowsers} = await importInstaller();
npm error ^^^^^
npm error
npm error SyntaxError: await is only valid in async function
...

I think, because its use "sh -c node install.mjs" and not "sh -c /opt/plesk/node/23/bin/node install.mjs"? How do I solve this? Thanks :)
 
The use of export PATH="/opt/plesk/node/23/bin:$PATH" has helped here.
added 108 packages, and audited 109 packages in 8s

10 packages are looking for funding
run `npm fund` for details

found 0 vulnerabilities

I tried first export NODE_PATH="/opt/plesk/node/23/bin/node", but that was not the right way. ;)
 
Back
Top