【问题标题】:Yarn Install fetching from old remote从旧遥控器获取纱线安装
【发布时间】:2019-08-06 18:45:44
【问题描述】:

我在 Ubuntu 16.04 上,我的项目是一个使用 yarn 和 git 的 react 项目。

在我的 package.json 中,我的项目使用以下格式从私有 github 存储库中提取依赖项:

...

    "dependencies": {
        "dep-name": "git+https://[oauth token]:x-oauth-basic@github.com/[MyOrg]/[dep-name].git#0.1.0",
    }

最近,oauth 令牌已失效,我不得不对其进行更新。但是,yarn install 继续使用旧令牌给我一个身份验证错误。

到目前为止,我已经尝试删除 yarn 缓存 (yarn cache clean)、删除 npm 缓存 (npm cache clear --force)、删除我的 nvm 缓存 (nvm cache clear) 并删除 yarn.lock 文件以及node_modules 文件夹。

我还尝试删除全局纱线缓存,并删除我的~/var/cache 目录中的yarn 文件夹。还是什么都没有。

谁能帮忙?

编辑:我还在我的项目文件夹中为旧令牌 (grep -R "old-oken") 运行了 grep,但在文件夹中找不到任何结果

【问题讨论】:

    标签: git yarnpkg


    【解决方案1】:

    想通了 - 它没有为该依赖项使用旧令牌,但实际上其中一个依赖项依赖项也是一个私有 repo,并使用导致问题的旧令牌访问

    【讨论】:

      猜你喜欢
      • 2020-02-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-14
      • 2022-10-19
      • 2020-04-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多