• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

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