What is the difference between local and global module in Node.js? When to use local and global module?
问题 We can access local module using require function but cannot access global module through it. I read somewhere that to use global module we need to make it local then import it through require function. So if we cannot access global module directly, then what is the need of using it. 回答1: You should: Install a module locally if you're going to require() it. Install a module globally if you're going to run it on the command line. 回答2: I think in my opinion the modules which you are going to