Fix TypeError in case of missing node_modules dir