Typescript Module not found Can't resolve

The error message was actually very misleading, and looks like a typescript bug. It appears that enums can't be exported directly, it seems necessary to use a const to be able to export them correctly.

So I modified my enum declaration like so

declare module 'seeyouftp' {

  // exporting a const instead of 
  export const enum AuthStates {
    success = 'success',
    error = 'error'
  }
}

Everything works now but that error message is very, very bad and time consuming