我正在尝试通过npm安装github私有存储库,其中包含其他私有github存储库作为依赖项.
尝试了很多方法和帖子,但没有一个工作.这是我正在做的事情:
npm install git+https://github.com/myusername/mygitrepository.git
Run Code Online (Sandbox Code Playgroud)
在package.json中就像:
"dependencies": {
"repository1name": "git+https://github.com/myusername/repository1.git",
"repository2name": "git+https://github.com/myusername/repository2.git"
}
Run Code Online (Sandbox Code Playgroud)
这样做的正确方法是什么?
这是我的问题.我们有一个私有的NPM注册表,只能在VPN中使用.我想有一个后备注册表https://registry.npmjs.org,这样当我离开VPN时,它可以无缝地工作.
PS目前我正在使用npmrc,它可以很好地切换.npmrc文件作为解决方法
我目前正在努力用 GitHub Actions 替换我们的 Drone CI 安装。
到目前为止,我的操作工作流归结为以下.github/workflows/ci.yml文件:
on: [ push, pull_request ]
name: CI
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: '13.x'
- name: Install Dependencies
run: npm install
Run Code Online (Sandbox Code Playgroud)
日志本身是一长串npm WARN tar ENOENT: no such file or directoryala 下面的截断列表。
2020-04-29T21:15:31.7899082Z npm install
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/project/project/node_modules/.staging/acorn-26d8ba97/dist/acorn.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/project/project/node_modules/.staging/coffeescript-acee515b/lib/coffee-script/register.js' …Run Code Online (Sandbox Code Playgroud)