纱线未知语法错误:未支持的选项名称(“ - check-files”)

发布于 2025-02-09 17:37:30 字数 534 浏览 1 评论 0原文

当我尝试运行纱线安装时 - check-files我克隆的轨道仓库中,我会收到以下错误:

Unknown Syntax Error: Unsupported option name ("--check-files").

$ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]
  • 我已经尝试更新纱线并将节点转到
  • 我的 最新稳定版本中尝试在本地文件夹中删除纱线/节点模块和Yarn.lock,然后运行YARN install再次
  • 我尝试了YARN升级-Latest,它也带来了类似的错误<代码>用法错误:找不到名为“升级”的脚本。
  • 我目前正在使用volta来管理我的版本,并且直到现在到目前为止还没有太多麻烦。 我以前曾经运行 - 在其他存储库上检查毫无问题。

When I try to run yarn install --check-files on a rails repo that I cloned I'm getting the following error:

Unknown Syntax Error: Unsupported option name ("--check-files").

$ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]
  • I've tried updating yarn and node to the latest stable versions
  • I've tried deleting yarn/node modules and yarn.lock in the local folder and running yarn install again
  • I've tried yarn upgrade --latest which also brings up a similar error Usage Error: Couldn't find a script named "upgrade".
  • I'm currently using volta to manage my versions and have not had too much trouble up until now.
    I've previously run --check-files on other repos with no problems.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冷了相思 2025-02-16 17:37:30

确定我的系统正在运行纱线3。我最初是使用啤酒安装纱线的,所以我必须使用以下步骤卸载并重新从NPM开始:

  1. Brew卸载Yarn Yarn用brew
  2. npm安装-G Yarn 删除YARN 使用npm 纱线安装纱线
  3. 设置版本经典将纱线版本设置为1。*
  4. YARN -V以确保我在版本1上。

Ok turns out my system was running yarn 3.* globally which was conflicting with my rails version (6.0.5). I had originally installed yarn using brew so I had to uninstall and start again with npm using the following steps:

  1. brew uninstall yarn to remove yarn with brew
  2. npm install -g yarn to install yarn with npm
  3. yarn set version classic to set yarn version to 1.*
  4. yarn -v to make sure I was on version 1.*
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文