When deploying a Node.js application on Systron hosting, you must install the external packages listed in your package.json file. Plesk provides built-in support for both npm and Yarn workflows directly from the graphical interface.
Choosing the Right Package Manager
While both tools accomplish the same core task, you should choose the one that matches your local development environment:
- Use npm if: You developed your app using standard npm commands, and your project root folder contains a
package-lock.jsonfile. - Use Yarn if: You prefer faster installation speeds, strict version pinning, and your project root folder contains a
yarn.lockfile.
How to Install Packages in Plesk
- Log in to Plesk and navigate to Websites & Domains.
- Click on the Node.js icon under your domain settings.
- Ensure your Application Root is correctly pointing to your project folder containing your
package.jsonfile. - Locate the installation buttons near the top of the Node.js settings screen.
- Click NPM Install if your project uses standard npm, or click Yarn if you utilize the Yarn package manager.
- Wait for the confirmation message. Plesk will run the installation process in the background and download the modules into a
node_modulesfolder inside your project.
Adding New Packages Later
If you add new dependencies to your local package.json file and upload the updated file to the server, simply return to this screen and click the corresponding install button again. Once completed, always click the Restart App button to apply the changes.