Message Mixer super_encoder.js

When I use node super-encoder.js decode I’m getting ReferenceError: caesarCipher is not defined

I’m not sure because caesarCipher function works in encode function block

// Import the encryptors functions here.
const { caesarCipher, symbolCipher, reverseCipher } = require('./encryptors.js');

const encodeMessage = (str) => {
  // Use the encryptor functions here.
  return reverseCipher(symbolCipher(caesarCipher(str, 7)));
}

const decodeMessage = (str) => {
  // Use the encryptor functions here.
  return caesarCipher(symbolCipher(reverseCipher(str)), -7);
}

// User input / output.

const handleInput = (userInput) => {
  const str = userInput.toString().trim();
  let output;
  if (process.argv[2] === 'encode') {
    output = encodeMessage(str);
  } 
  if (process.argv[2] === 'decode') {
    output = decodeMessage(str);
  } 
  
  process.stdout.write(output + '\n');
  process.exit();
}

// Run the program.
process.stdout.write('Enter the message you would like to encrypt...\n> ');
process.stdin.on('data', handleInput);

I am having the same exact issue and cannot find a resolution.

It seems like this might be the same problem people are having on this thread: Message Mixer updated version - #11 by codecoder61975

Does that change fix your issue?

Good luck! :+1: