Unexpected token < in JSON at position 0"

Glad to hear that it was a helpful start @cemailtatari !

That error usually comes up when you function is stuck in a nice function self-call loop, where a function is calling itself again over and over.

In your case, that happens here :

// Backend Code for LicenceKey

var md5 = require('md5');       
 
export function MyLicenceKey(ProductKey) {
 
 let Salt= "salz";
 let ModProductKey= ProductKey + Salt;
 

 return 
 -->MyLicenceKey(ProductKey)<-- .value=md5(ModProductKey).value;

}


What your backend file, ‘backend/MyHash’, could be instead is below:

// Backend Code for LicenceKey

var md5 = require('md5');       
 
export function MyLicenceKey(ProductKey) {
 
 let Salt= "salz";
 let ModProductKey= ProductKey + Salt;
 

 return md5(ModProductKey); //Removing all unnecessary extra code, except for the message digest hashing function.

}

This should give you back the MD5 function you’re looking for with the hash of the Product Key, concatted to the Salt.

Since MD5 is more or less globally the same, you should be able to test if this gives you the values you expect.