在我的项目中,我试图迁移 从 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/