Tag: sinopia

使用多个npmregistry和用户帐户

对于我自己的东西,我使用公共npmregistry,但是我目前正在使用的一个客户端刚刚安装了sinopia,并希望将其用于在站点上托pipe的私有模块。 这很好,但是当我在不同的地方使用我的笔记本电脑时,我并不想将自己永久地绑定到这个registry,所以我们已经设置了每个我们在这里使用的repo默认情况下使用自定义registry: "publishConfig": { "scope": "@somecompany", "registry": "http://sinopia-box:4873/" } 这将绑定我正在对这个registry,这是伟大的回购,但我需要validation自己与它,所以我需要在那里设置一个用户,所有后来出版的这个回购将需要使用这个创build的用户帐户,但是我只想在我使用该存储库时使用它。 那么是否有办法能够保持正常的npmregistry作为默认与我的npm用户帐户(已经保存在本地),但不知何故只是注册该registry的用户帐户,所以当它通过npm publish与npm publish自定义的publishConfig它只是知道registry,并自动使用正确的用户帐户。 因为我不想处于一个每天早上都要进来的位置,并设置registry并使用不同的帐户,然后回家并将其重置到公共npmregistry中,我只想让npm知道然后忘了这个registry的用户,那么无论如何有我的蛋糕,吃在这里?

我怎样才能让Sinopia镜像来自registry.npmjs.org的所有npm包?

我正在离线环境中设置一个完整的npm仓库,我正在研究使用Sinopia作为仓库。 这是以前完成的。 在Sinopia github页面上的这个线程描述了一个类似的场景,在这个场景下,你可以将所有包从registry.npmjs.org下载到在线环境中,然后将它们复制到脱机环境,甚至包括一个脚本来将所有文件下载到Sinopia后端。 该脚本似乎工作,但它并没有真正下载所有的软件包 – 只有所有版本的软件包已经安装。 有没有其他方法可以告诉Sinopia从registry.npmjs.org下载所有pagkages,或者我可以以某种方式从registry.npmjs.org获取软件包的完整列表并使用它将所有文件下载到Sinopia? 任何input赞赏!

“npm install -g”到底做了什么?

我想用sinopiabuild立一个私人的npmregistry,并执行'npm install -g sinopia'。 但是一些错误信息发生在下面。 > crypt3@0.1.8 install /usr/local/lib/node_modules/sinopia/node_modules/crypt3 > node-gyp rebuild gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.2.3" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/sinopia/node_modules/crypt3/.node-gyp" make: Entering directory `/usr/local/lib/node_modules/sinopia/node_modules/crypt3/build' CXX(target) Release/obj.target/crypt3/crypt3.o In file included from ../crypt3.cc:7:0: ../node_modules/nan/nan.h:261:25: error: redefinition of âtemplate<class T> […]

安装sinopia之后npm不能正常工作

在安装sinopia之前,一切工作正常,但之后npm失败。 PLZ帮助我回滚到原来的设置。 每当它尝试安装新的npm软件包时都会出错。 例如。 当我跑这个 npm install -g mocha grunt-cli bower karma-cli npm ERR! Linux 4.4.0-34-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "mocha" "grunt-cli" "bower" "karma-cli" npm ERR! node v4.4.5 npm ERR! npm v2.15.5 npm ERR! code ECONNREFUSED npm ERR! errno ECONNREFUSED npm ERR! syscall connect npm ERR! Error: connect ECONNREFUSED 127.0.0.1:4873 npm ERR! […]

与电子更新和Sinopia节点registrypath

我目前正在研究一个在Electron(former atom-shell)上运行的应用程序,并试图devise一种方法来在有新的更新可用时提醒用户。 为此,我使用电子 更新器样本中描述的方式使用电子 更新器 。 我还configuration了Sinopia在http://localhost:4873/ (默认行为)上侦听并运行这个命令行: npm config set registry "http://localhost:4873"我检查了.npmrc文件,registry正确设置了新的值。 我遇到的问题是当我尝试检查更新时,我在控制台中得到此错误消息: {[HTTPError:响应代码404(未find)] 消息:'响应码404(未find)', 代码:undefined, 主机:'registry.npmjs.org', 主机名:'registry.npmjs.org', 方法:'GET', path:'/黑客键盘电子', statusCode:404, statusMessage:'Not Found'} 所以我相信我在npm的configuration中忘记了一些东西,这使得应用程序监听npm而不是Sinopia服务器的正常path。 问题是什么? 请在下面find我使用的代码: foob​​ar的发电机 ├──app ├── 凉亭组件 ├──bower.json ├──index.html ├──索引。 JS ├──主。 JS ├──nbproject ├── 节点模块 ├──npm-debug.log ├──package.json ├──自述。 MD └──sinopia 的package.json { "name": "foobar-generator", "version": "0.0.1", "description": "A generator for […]

如何解决这个sinopia安装错误?

我正在使用redhat5.9。 我发现了“make”相关的exception。 我想知道他们在做什么? 我认为他们只是JavaScript的重要内容。 [root@xxxx bin]# npm install -g sinopia –python=/usr/local/clo/ven/python-2.7.11/bin/python > crypt3@0.1.8 install /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3 > node-gyp rebuild gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.2.3" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3/.node-gyp" make: Entering directory `/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3/build' CXX(target) Release/obj.target/crypt3/crypt3.o cc1plus: error: unrecognized command line […]

“npm install -g xxx”安装到什么地方?

例如, npm install -g sinopia 在windows7上,我将在C:\ Users \ xxxx \ AppData \ Roaming \ npm中安装sinopia命令和相关模块。 在Redhat5上,我的节点和npm命令位于/usr/local/clo/ven/node-v4.2.3-linux-x64/bin。 当我运行'npm install -g sinopia'时,默认情况下,sinopia被安装在当前目录下,如下所示。 但是目前我有一台装有其他人装的sinopia的linux机器。 我在node / bin里找不到sinopia的启动脚本,我可以在下面findsinopia相关的东西。 。 我在哪里可以findsinopia的开始脚本? 是否可以configuration'npm install -g xxx'的安装位置?