Access node_modules from another folder

后端 未结 4 717
一向
一向 2021-01-17 18:08

Recently started working with Gulp and I can\'t figure out is it really necessary to have a copy of node_modules directly in folder with current project? E.g. I have this s

4条回答
  •  庸人自扰
    2021-01-17 18:22

    Maybe you should put your package.json into your root directory(mysite/package.json),
    then try to install node_modules on the root.
    In addition, you write gulpfile on the same dir.

    eg.

    mysite  
    |- package.json  
    |- node_modules  
    |- gulpfile.js  
    └─builder  
    └─work  
    └─work2
    

    However, I recommend that you write one single gulpfile for each project.

提交回复
热议问题