报错信息:
info fsevents@2.3.2: The platform "win32" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "win32" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
error less-loader@10.0.1: The engine "node" is incompatible with this module. Expected version ">= 12.13.0". Got "10.16.3"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
可以尝试这样安装less和less-loader
yarn add less@2.7.3
yarn add less-loader@4.1.0
这篇博客介绍了在Windows环境下遇到的Yarn安装less和less-loader时出现的平台不兼容及Node版本不符的错误。错误信息表明fsevents模块与win32平台不兼容,同时less-loader需要的node版本高于12.13.0,但当前版本为10.16.3。解决方案是手动指定less和less-loader的版本进行安装,如使用less@2.7.3和less-loader@4.1.0。这将帮助开发者解决依赖冲突并继续他们的前端项目。

5624

被折叠的 条评论
为什么被折叠?



