背景
yarn set version stable
将 Yarn 从 v1 升级到 v3 后,使用 Yarn 3 执行 yarn install 安装项目依赖后,没有 node_modules 文件夹
原因
执行 yarn install 安装依赖后提示成功,也没有报错,于是去文档 FAQ 的部分看能不能找到有用的信息,尝试搜索一下 module,果然找到了相关的信息:
Some tools (mostly React Native and Flow) will require downgrading to the node_modules install strategy by setting the nodeLinker setting to node-modules. TypeScript doesn’t have this problem.
定位到 nodeLinker 这个配置,于是查了一下这个配置详细的说明:
Defines what linker should be used for installing Node packages (useful to enable the node

最低0.47元/天 解锁文章
2万+





