node.js - 从 npm 迁移到 yarn 时出错 - 引擎 "node"与此模块不兼容

标签 node.js npm migration yarnpkg

在我的项目中,我试图迁移 从 npm 到 yarn .
我只是运行了“ yarn ”命令来生成“ yarn.lock ”。
在此过程中,它向我显示了以下错误:

error linearicons@1.0.2: The engine "node" is incompatible with this module.


Expected version "^12.13.0". Got "10.19.0" error Found incompatible module.


所以我运行命令“ npm remove linearicons ”然后“ yarn ”生成“ yarn.lock ”没有错误,然后添加“|7 yarn1091916”线性图标 ”。但它给了我与上面相同的错误。
我的 yarn 版本为 1.22.10
Node 版本:v10.19.0
我能做些什么来解决这个问题?我不明白他想要什么

最佳答案

更新 node.js 版本:
nvm的安装

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
$ source ~/.bashrc
寻找 node.js 的现有版本
$ nvm ls-remote
安装最后一个(截至今天)
$ nvm install v16.8.0
之后,您的问题应该得到解决。

关于node.js - 从 npm 迁移到 yarn 时出错 - 引擎 "node"与此模块不兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67105067/

相关文章:

rabbitmq - 从 AMQP 迁移到 Amazon SNS/SQS - 需要了解概念

javascript - Protractor - 识别 Ui-Sref 链接

javascript - 缺少 Express SSL 身份验证功能?

Node.js 可读流 : what is chunk size?

php - 从 PHP 5.2 升级到 PHP 5.3 - 向后不兼容的更改 - 如何轻松检测?

c++ - 丢失的 ;在 VC9 中编译 VC6 代码时在标识符之前

javascript - 使用 Electron 和 ReactJS 执行 R 脚本

node.js - npm shrinkwrap 中的 fsevents(由 chokidar 引入)导致构建在 Windows 上失败

node.js - npm install 时发生致命坏对象错误

javascript - 为什么UNPKG可以免费使用,如果我过度使用会怎样?