Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vincej's avatar
Level 15

ReferenceError: HashTable is not defined

I am moving my application from development into production and to that end have been moving all my JS into Laravel Mix as well Node Modules. Everything worked great in development, however, now I am getting JS errors.

jquery.numberformatter is giving me the error, HashTable not defined. I never had this error in development.

I have tried adding the 3rd party hashtable.js I had been using into MIx - failed to fix the error. I also installed an alternative hashtable code into node modules and then included it in bootstrap.js with a require - that failed.

Maybe I should change the numberFormatter??

There is almost nothing on LC about this issue, so everybody must know how to solve this ...

Ideas?? Many thanks !

0 likes
3 replies
click's avatar

How did you deploy your code?

  1. Did you commit your public (minified/combined) js files?
  2. Or do you run yarn prod or npm prod during deployment? If so, do you run yarn install or npm install during deployment as well?
vincej's avatar
Level 15

Thanks for coming back. Under development I had all my JS files within public > JS. My jquery-numberFormatter and hashtable.js were held in public like this. Now under production I have moved all my JS files into resources > JS and added them into a MIX file with the output to public > js > app.js and they now give me this error, "Hash table not defined"

So - I tried an alternative. I installed jquery-numberformatter and jshashtable with npm into node modules and added them to bootstrap.js. This didn't work either.

Please or to participate in this conversation.