js sourcemapping working but throwing errors