如何解决纱线包不会因依赖问题而更新
在开发服务器上,对于几乎没有部署的应用程序,由于缺少完整性文件,rails 命令将无法执行。
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.
========================================
两者
yarn install --check-files
yarn install
导致同样的错误
compression-webpack-plugin@4.0.1: The engine "node" is incompatible with this module. Expected version ">= 10.13.0". Got "8.17.0"
Found incompatible module
Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
很遗憾,'visit' 提示没有用,因为它不处理节点引擎。
勉强部署,还没有 node-modules 目录,这是预期的。但是在开发机器上有目录,预编译资产没有任何问题。
服务器上下文:
node -v
> v8.17.0
这种情况如何解封?
解决方法
您需要将节点更新到比上面提到的 >= 10.13.0
更高的版本,然后重新安装 yarn 并重新运行检查:
如果您使用的是 Mac 操作系统:
brew install node@14 && brew link --force node@14
brew install yarn
cd ~
curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs
然后检查您是否有兼容的版本
node -v
=> v14.2.0
``
if so re-run any of your commands:
```bash
yarn install --check-files
yarn install
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。