Exception thrown is t.addLocalHook is not a function

Tags: #<Tag:0x00007f4535529eb0>


Following is the context environment:

Angular version installed

And in package.json we have following the dependencies:

@handsontable/angular”: “^10.0.0”

“handsontable”: “^10.0.0”

When we run our application using the command “ng run serve”, we do not see any issues.

But when the build is created using the command “npm run build-prod” and deployed in the runtime http server we are seeing the following exception when the application is launched:

t.addLocalHook is not a function.

Please let us know on this.


Hi @a_ntn

Please let me know what do you call under the npm run build-prod in your package.json file.
I will test it out on my device.


Yes thanks for your quick feedback.
So build-prod is actually using the following:
node --max_old_space_size=4048 ./node_modules/@angular/cli/bin/ng build --prod

Thank you for sharing the details @a_ntn

When I run the project locally on Mac Big Sur 11.6 using Handsontable v10 / Angular 12 I do not get this error. It might be related to settings in your table. Based on

t.addLocalHook is not a function.

the t has to be the issue. But I do not know if you use that in your application or it is a response from the handsontable.full.min.js file.


So basically the error looks to be thrown from handsontable.full.min.js.

Then , I guess the following should work:

Angular 11 on the developer machine and package.json having dependencies “@handsontable/angular”: “^10.0.0” and “handsontable”: “^10.0.0” .

Please let us know.


Yes, you can try with that and (if that is possible) double the limit of memory for the process.
If that won’t work we can move to emails to schedule a code review.

Yes Thanks!, and will let you know how it works.