npm-private-modules

Define private registry in package.json

有些话、适合烂在心里 提交于 2019-12-05 18:30:21
问题 We have a private npm repository based on Sinopia What should I define in package.json that some packages will be installed from Synopia rather then from global npm repository? If I install it from command line I can run: npm install <package_name> --registry <http://<server:port> P.S. tried to google and looked in official NPM documentation but have found nothing. 回答1: One of the method i know that is by .npmrc You can also use .npmrc also inside the project set configuration like this

Define private registry in package.json

末鹿安然 提交于 2019-12-04 02:07:52
We have a private npm repository based on Sinopia What should I define in package.json that some packages will be installed from Synopia rather then from global npm repository? If I install it from command line I can run: npm install <package_name> --registry <http://<server:port> P.S. tried to google and looked in official NPM documentation but have found nothing. One of the method i know that is by .npmrc You can also use .npmrc also inside the project set configuration like this registry = http://10.197.142.28:8081/repository/npm-internal/ init.author.name = Himanshu sharma init.author

docker build + private NPM (+ private docker hub)

时光总嘲笑我的痴心妄想 提交于 2019-11-30 12:30:10
I have an application which runs in a Docker container. It requires some private modules from the company's private NPM registry (Sinopia), and accessing these requires user authentication. The Dockerfile is FROM iojs:latest . I have tried: 1) creating an .npmrc file in the project root, this actually makes no difference and npm seems to ignore it 2) using env variables for NPM_CONFIG_REGISTRY , NPM_CONFIG_USER etc., but the user doesn't log in. Essentially, I seem to have no way of authenticating the user within the docker build process. I was hoping that someone might have run into this

docker build + private NPM (+ private docker hub)

牧云@^-^@ 提交于 2019-11-29 12:09:43
问题 I have an application which runs in a Docker container. It requires some private modules from the company's private NPM registry (Sinopia), and accessing these requires user authentication. The Dockerfile is FROM iojs:latest . I have tried: 1) creating an .npmrc file in the project root, this actually makes no difference and npm seems to ignore it 2) using env variables for NPM_CONFIG_REGISTRY , NPM_CONFIG_USER etc., but the user doesn't log in. Essentially, I seem to have no way of

How to install a private NPM module without my own registry?

半世苍凉 提交于 2019-11-26 02:28:57
I've taken some shared code and put it in an NPM module, one I don't want to upload to the central registry. The question is, how do I install it from other projects? The obvious way is probably to set up my own NPM registry, but according to the documentation, that involves a lot of hassle. Can I just install an NPM module that sits on the local filesystem, or perhaps even from git? npm install --from-git git@server:project cd somedir npm install . or npm install path/to/somedir somedir must contain the package.json inside it. It knows about git too: npm install git://github.com/visionmedia

How to install a private NPM module without my own registry?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 01:09:47
问题 I\'ve taken some shared code and put it in an NPM module, one I don\'t want to upload to the central registry. The question is, how do I install it from other projects? The obvious way is probably to set up my own NPM registry, but according to the documentation, that involves a lot of hassle. Can I just install an NPM module that sits on the local filesystem, or perhaps even from git? npm install --from-git git@server:project 回答1: cd somedir npm install . or npm install path/to/somedir