Yarn 使用方法与常见问题
yarn install error Expected version
报错示例
info fsevents@1.2.12: The platform "linux" is incompatible with this module.
info "fsevents@1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
error mkdirp@1.0.4: The engine "node" is incompatible with this module. Expected version ">=10". Got "8.15.0"
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/upgrade for documentation about this command.
解决办法
yarn install --ignore-engines
yarn install 报错
报错示例
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'install'
解决办法
去官网安装最新yarn
https://classic.yarnpkg.com/en/docs/install/#debian-stable
yarn 禁用安装证书时检测
报错示例
xxx@xxx:/xxx/xxx/ant-design-pro-vue# yarn install
node: /usr/local/openssl/lib/libssl.so.1.0.0: no version information available (required by node)
node: /usr/local/openssl/lib/libssl.so.1.0.0: no version information available (required by node)
node: /usr/local/openssl/lib/libssl.so.1.0.0: no version information available (required by node)
node: /usr/local/openssl/lib/libcrypto.so.1.0.0: no version information available (required by node)
node: /usr/local/openssl/lib/libcrypto.so.1.0.0: no version information available (required by node)
yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "https://registry.npm.taobao.org/@ant-design-vue/pro-layout/download/@ant-design-vue/pro-layout-0.2.10.tgz: unable to get local issuer certificate".
info If you think this is a bug, please open a bug report with the information provided in "/data/baota/ant-design-pro-vue/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
解决办法
yarn config set strict-ssl false