fix npm module build crash