Plesk

Node.js packages are removed automatically

Symptoms

A Node.js package was installed globally and is missing after some time:

# /opt/plesk/node/12/bin/npm install -g postcss
# /opt/plesk/node/12/bin/npm list -g --depth 0
/opt/plesk/node/14/lib
├── npm@6.14.15
└── postcss@8.4.0

After a while, the package is missing:

# /opt/plesk/node/12/bin/npm list -g --depth 0
/opt/plesk/node/14/lib
└── npm@6.14.15

Cause

This has been reported as bug ID EXTNODEJS-182.

Resolution

As a workaround disable automatic updates for Node.js:

  1. Log into Plesk

  2. Open Tools & Settings > Scheduled Tasks

  3. Disable the task /usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/nodejs/scripts/nodejs-auto-update.php' by clicking the check icon: