禁用 check_yarn_integrity 的后果? [英] Consequences of disabling check_yarn_integrity?

查看:83
本文介绍了禁用 check_yarn_integrity 的后果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试启动 rails 服务器时看到一条常见消息:

I see a common message when trying to start the rails server:

rails s                              
=> Booting Puma
=> Rails 6.0.3.2 application starting in development 
=> Run `rails server --help` for more startup options
error Couldn't find an integrity file                                                                                                              
error Found 1 errors.                                                                                                                              


========================================
  Your Yarn packages are out of date!
  Please run `yarn install --check-files` to update.
========================================


To disable this check, please change `check_yarn_integrity`
to `false` in your webpacker config file (config/webpacker.yml).


yarn check v1.22.10
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.

我已经尝试了 2 天来解决这个问题.删除 node_modules 并重新安装等,但我所做的一切都没有奏效.因此,我正在考虑按照消息的建议进行操作并禁用纱线完整性检查.

I have tried for 2 days to fix this. Deleting node_modules and reinstalling, etc, but nothing I do has worked. So I am considering doing as the message suggests and disabling the yarn integrity check.

此完整性检查有什么作用,我是否应该担心禁用它?

What does this integrity check do, and should I be worried about disabling it?

建议/推荐在一些地方禁用此完整性检查,包括

Disabling this integrity check is suggested/recommended in a few places, including

我重新安装了 nvm、node 和 yarn 只是为了消除可能的问题原因:

I reinstalled nvm, node and yarn just to eliminate possible causes of problems:

nvm -v 
0.38.0

node -v
v16.0.0

npm -v
7.10.0

yarn -v
1.22.10

推荐答案

您是否尝试过运行建议的命令?

have you tried running the suggested command?

yarn install --check-files

您也可以尝试重新安装 webpacker,这将创建一个新的清单文件,它将通过完整性检查:

you could also try reinstalling webpacker, which will create a new manifest file which will pass integrity checks:

rails webpacker:install

这篇关于禁用 check_yarn_integrity 的后果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆