Updated onError in require.d.ts

Reported by @mgs-github