纱线未知语法错误:未支持的选项名称(“ - check-files”)
当我尝试运行纱线安装时 - 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 errorUsage 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确定我的系统正在运行纱线3。我最初是使用啤酒安装纱线的,所以我必须使用以下步骤卸载并重新从NPM开始:
Brew卸载Yarn Yarn
用brewnpm安装-G Yarn
删除YARN 使用npm纱线安装纱线
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:
brew uninstall yarn
to remove yarn with brewnpm install -g yarn
to install yarn with npmyarn set version classic
to set yarn version to 1.*yarn -v
to make sure I was on version 1.*