simplified the node module compatibility code