node.js - How to reference nodejs global module?
PHP中文网
PHP中文网 2017-06-05 11:12:53
0
1
739

How to reference nodejs global module?

Let’s talk about the scenario. I have a project A. When building it, the modules are installed globally. Then a new project B was created. Project B also needs to reference modules, and there are many applied modules.

How to quickly install the dependencies required for the project without manually modifying dependencies?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
刘奇

According to what you mean, I understand that all the dependencies required for project B have been installed when building project A, and are they installed globally? In this case, for you, project B does not need to install dependencies anymore. You can just reference them directly in your code. Dependencies are searched layer by layer until they are global. However, this way of writing is extremely not recommended. , it will be particularly troublesome when your project requires multiple people to develop and maintain. I personally recommend using npm install... --save to locally install dependencies and automatically write them into dependencies / devDependencies

when building the project.
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template