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

Weblutions Documentation / Knowledgebase / TypeError: Setting User Fix

Updated

TypeError: Setting User Fix

By Josh M. 1 mins 1

At times a Weblutions product may have a user related error generate when a login or registration is attempted. Specifically, the setting user type error. This page will explain the error and provide a solution that often corrects the error if ongoing.

TypeError: Cannot set properties of undefined (setting 'user')

Why Does it Populate

This error may occur when there's a backend error setting the users session data after they've attempted to complete a login. This error comes from the passport package and is a more rare error. However, can be less conventional to fix.

How to Fix

  1. Ensure the application/product is not actively running

  2. Open your servers command prompt/terminal

  3. Delete the node_modules folder from the products install location with the below command (eg; /home/faxstore)

Always be careful when using the rm command as deleted data is not recoverable.

rm -r /home/faxstore/node_modules
  1. Delete the package-lock.json from the install directory as well

rm /home/faxstore/package-lock.json
  1. Install the node packages again

cd /home/faxstore && npm install
  1. Start the product and see if the issue is corrected

Example Error Image

A boring example image

If the error is ongoing, also try deleting browser cookies for the website as this could be a contributing factor.