Skip to content
Advertisement

Tag: module

NodeJs heap-js module: Heap is not a constructor

I am trying to initialize a minimum heap/priority queue in my server.js using the head-js module (https://github.com/ignlg/heap-js). When I run my code, I receive the following error: TypeError: Heap is not a constructor However, according to the documentation, I am initializing the heap correctly, putting in a custom constructor as the parameter. Below is my […]

require.cache equivalent in ES modules

ES Modules docs states: require.cache is not used by import. It has a separate cache. So where’s this separate cache? Is it accessible after all? I’m looking for invalidating module caching as it can be done in CommonJS modules (node.js require() cache – possible to invalidate?) Answer I saw your thread on the nodeJS github and your answer is there:

Advertisement