add error.js as core module