Getting error when building with webpack