当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Can we config node.js to look for node_modules & my-node_modules folder

问题描述:

I created npm library my-private-npm(locally).

I can refer to this library by require('./my-node_modules/my-private-npm').

But If I want to do like this require('my-private-npm') It has to be included in node_modules folder.

How we can tell node.js to look in my-node_modules folder also?

Or is there any alternative, where I can do require('my-private-npm').

分享给朋友:
您可能感兴趣的文章:
随机阅读: