如何关闭yarn@2 PnP? [英] How to turn off yarn@2 PnP?

查看:40
本文介绍了如何关闭yarn@2 PnP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 yarn 2.0.0-rc.27 + 工作区 + 打字稿,我想关闭 PnP 并再次使用 node_modules.我在 package.json 中使用以下设置进行了尝试:

I am using yarn 2.0.0-rc.27 + workspaces + typescript and I want to turn PnP off and use node_modules again. I tried it with following setting in package.json:

  "installConfig": {
    "pnp": false
  },

但是yarn每次都使用PnP模式.有没有办法关闭它?

But yarn uses PnP mode every time. Is there any option to turn it off?

推荐答案

我在 Yarn 2 以及使用相同堆栈时遇到了一系列问题.解决方案是使用以下行创建一个 .yarnrc.yml 文件:

I ran into a bunch of issues with Yarn 2 as well using same stack. Solution is to create a .yarnrc.yml file with the following line:

nodeLinker: node-modules

这篇关于如何关闭yarn@2 PnP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆