Weblutions Documentation
Weblutions Main Site Contact Us Our Discord
Some pages are still pending proper formatting, if required refer to the legacy documentation website.
Knowledgebase IconKnowledgebase

Reinstalling Node Modules

By Josh M. 1 mins 2

Reinstalling Node.js modules is a common troubleshooting step used to resolve issues caused by corrupted dependencies, failed installs, or mismatched versions.

This process fully removes existing modules and reinstalls them based on the package.json file, ensuring a clean and consistent dependency state.

When to Use This Guide

Reinstalling node modules is recommended when:

  • The application fails to start after updates

  • Errors reference missing or incompatible packages

  • Dependencies behave unexpectedly

  • Build or runtime issues appear without clear cause


1. Navigate to the Application Directory

Open a terminal and navigate to the root directory of the application:

cd /path/to/application

On Weblutions products the directory is usually in the /home. For example /home/faxstore

2. Remove Existing Modules and Lock File

Delete the node_modules folder and package-lock.json file to ensure all dependencies are reinstalled from scratch:

rm -rf node_modules package-lock.json

3. Reinstall Dependencies

Run the install command to reinstall all dependencies defined in package.json:

npm install

This will download and rebuild all required packages based on the latest compatible versions defined in the package.json.

Now start the application as per normal node . and if issues continue to persist the optional steps below may of assistance for further trouble-shooting of the application.


Optional: Clean NPM Cache

The cache for the Node Package Manager (NPM) can at times cause issues with package downloads, especially if Node.js has been installed for some time.

Before cleaning the Node.js cache steps one and two from the above must be completed.

To clean the cache the clear cache command can be ran on the server.

npm cache clean --force

Once the cache has been cleaned the node modules can be reinstalled with the install command.

npm install

Optional: Reinstall Node.js

Further, Node.js can be completely reinstalled with a program like Node Version Manager (NVM), for more information for that process see the Using Node Version Manager Guide.


If further issues persist, it's recommended to contact Weblutions if this is in relation to a Weblutions product.