15 November 2017

Angular build error : Hashingcrypto.js

Angular is for rapid development and its more frustrating with stuck on unconventional exception during build.
once of the instance I encounted was at hashingcryto.js failed at 86%

after ample research I figured a way to normalize the error to have more generic outcome to pin point troubleshoot.
all you need to do is find file HarmonyExportImportedSpecifierDependency.js which would be present at
  •   node_modules\webpack\lib\dependencies\HarmonyExportImportedSpecifierDependency.js
edit the file (pref. Notepad) and go to line number 144.
current function
updateHash(hash) {
        super.updateHash(hash);
        const hashValue = this.getHashValue(this.importDependency.module);
        hash.update(hashValue);
    }



replace with
updateHash(hash) {
super.updateHash(hash);
const hashValue = this.getHashValue(this.importDependency.module);

if (this.importDependency.module != null){
// console.log('Module resource: ', this.importDependency.module.resource);
}else{
console.log('\n Akx added Error File not found: ', this.importDependency);
}


now rebuild & vola you have gunned down the culprit to fix against

Hope this resolves your exception.



Rate Now: